Title: [218456] trunk/Source/WebCore
Revision
218456
Author
[email protected]
Date
2017-06-17 13:37:07 -0700 (Sat, 17 Jun 2017)

Log Message

Demote the "we have navigated away" check to an assertion.
https://bugs.webkit.org/show_bug.cgi?id=173509

Reviewed by Simon Fraser.

Now that the expected behavior is that the render tree can't get to the page cache, it's ok to assert.
TODO: We should also have view() check removed at some point.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (218455 => 218456)


--- trunk/Source/WebCore/ChangeLog	2017-06-17 20:03:58 UTC (rev 218455)
+++ trunk/Source/WebCore/ChangeLog	2017-06-17 20:37:07 UTC (rev 218456)
@@ -1,3 +1,16 @@
+2017-06-17  Zalan Bujtas  <[email protected]>
+
+        Demote the "we have navigated away" check to an assertion.
+        https://bugs.webkit.org/show_bug.cgi?id=173509
+
+        Reviewed by Simon Fraser.
+
+        Now that the expected behavior is that the render tree can't get to the page cache, it's ok to assert.
+        TODO: We should also have view() check removed at some point.
+
+        * dom/Document.cpp:
+        (WebCore::Document::destroyRenderTree):
+
 2017-06-17  Alex Christensen  <[email protected]>
 
         Fix CMake build

Modified: trunk/Source/WebCore/dom/Document.cpp (218455 => 218456)


--- trunk/Source/WebCore/dom/Document.cpp	2017-06-17 20:03:58 UTC (rev 218455)
+++ trunk/Source/WebCore/dom/Document.cpp	2017-06-17 20:37:07 UTC (rev 218456)
@@ -2215,11 +2215,9 @@
 void Document::destroyRenderTree()
 {
     ASSERT(hasLivingRenderTree());
-    ASSERT(frame());
+    ASSERT(frame() && frame()->document() == this);
     ASSERT(page());
 
-    FrameView* frameView = frame()->document() == this ? frame()->view() : nullptr;
-
     // Prevent Widget tree changes from committing until the RenderView is dead and gone.
     WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;
 
@@ -2230,8 +2228,8 @@
 
     documentWillBecomeInactive();
 
-    if (frameView)
-        frameView->willDestroyRenderTree();
+    if (view())
+        view()->willDestroyRenderTree();
 
 #if ENABLE(FULLSCREEN_API)
     if (m_fullScreenRenderer)
@@ -2258,8 +2256,8 @@
     m_textAutoSizedNodes.clear();
 #endif
 
-    if (frameView)
-        frameView->didDestroyRenderTree();
+    if (view())
+        view()->didDestroyRenderTree();
 }
 
 void Document::prepareForDestruction()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to