浏览代码

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.
Aliaksandr Kalenik 1 年之前
父节点
当前提交
7f0bafdbd0
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      Userland/Libraries/LibWeb/Painting/StackingContext.cpp

+ 3 - 1
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;
 }