Skip to content

Commit

Permalink
LibWeb: Log error instead of crashing if stacking context painted twice
Browse files Browse the repository at this point in the history
Turns out this mistake happens fairly often, so it is more preferable to
log message and proceed instead of crashing.
  • Loading branch information
kalenikaliaksandr authored and awesomekling committed May 5, 2024
1 parent 130aff1 commit 7f0bafd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Userland/Libraries/LibWeb/Painting/StackingContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 7f0bafd

Please sign in to comment.