From 7f0bafdbd0c49b3c69bbecbe0ef076918158fe65 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Sun, 5 May 2024 17:44:23 +0200 Subject: [PATCH] LibWeb: Log error instead of crashing if stacking context painted twice Turns out this mistake happens fairly often, so it is more preferable to log message and proceed instead of crashing. --- Userland/Libraries/LibWeb/Painting/StackingContext.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp index 091f76aa9d9..15d6186d3bf 100644 --- a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp +++ b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp @@ -57,7 +57,9 @@ void StackingContext::sort() void StackingContext::set_last_paint_generation_id(u64 generation_id) { - VERIFY(!m_last_paint_generation_id.has_value() || m_last_paint_generation_id.value() < generation_id); + if (m_last_paint_generation_id.has_value() && m_last_paint_generation_id.value() >= generation_id) { + dbgln("FIXME: Painting commands are recorded twice for stacking context: {}", m_paintable->layout_node().debug_description()); + } m_last_paint_generation_id = generation_id; }