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.
This commit is contained in:
Aliaksandr Kalenik 2024-05-05 17:44:23 +02:00 committed by Andreas Kling
commit 7f0bafdbd0
Notes: sideshowbarker 2024-07-17 05:01:20 +09:00

View file

@ -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;
}