ASSERTION FAILED: (!s_current || &m_view != &s_current->m_view) in RenderTreeBuilder...
authorshihchieh_lee@apple.com <shihchieh_lee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 May 2020 20:13:57 +0000 (20:13 +0000)
committershihchieh_lee@apple.com <shihchieh_lee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 May 2020 20:13:57 +0000 (20:13 +0000)
https://bugs.webkit.org/show_bug.cgi?id=212163

Unreviewed. Improve readability. Replace comments with curly brackets for scoping.

* dom/Document.cpp:
(WebCore::Document::updateRenderTree):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262103 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp

index 3c796e4..a4a5863 100644 (file)
@@ -1,3 +1,13 @@
+2020-05-23  Jack Lee  <shihchieh_lee@apple.com>
+
+        ASSERTION FAILED: (!s_current || &m_view != &s_current->m_view) in RenderTreeBuilder::RenderTreeBuilder
+        https://bugs.webkit.org/show_bug.cgi?id=212163
+
+        Unreviewed. Improve readability. Replace comments with curly brackets for scoping.
+
+        * dom/Document.cpp:
+        (WebCore::Document::updateRenderTree):
+
 2020-05-23  Zalan Bujtas  <zalan@apple.com>
 
         [LFC][TFC] Maximum constraint of a cell should never be smaller than the minimum width
index ed98ba9..cf6cae4 100644 (file)
@@ -1924,13 +1924,14 @@ void Document::updateRenderTree(std::unique_ptr<const Style::Update> styleUpdate
 {
     ASSERT(!inRenderTreeUpdate());
 
-    // NOTE: Preserve the order of definitions below so the destructors are called in proper sequence.
     Style::PostResolutionCallbackDisabler callbackDisabler(*this);
-    SetForScope<bool> inRenderTreeUpdate(m_inRenderTreeUpdate, true);
-    RenderTreeUpdater updater(*this, callbackDisabler);
-    // End of ordered definitions
-
-    updater.commit(WTFMove(styleUpdate));
+    {
+        SetForScope<bool> inRenderTreeUpdate(m_inRenderTreeUpdate, true);
+        {
+            RenderTreeUpdater updater(*this, callbackDisabler);
+            updater.commit(WTFMove(styleUpdate));
+        }
+    }
 }
 
 void Document::resolveStyle(ResolveStyleType type)