Title: [242797] trunk/Source/WebCore
Revision
242797
Author
[email protected]
Date
2019-03-12 09:50:46 -0700 (Tue, 12 Mar 2019)

Log Message

In CachedFrame's constructor, release-assert that DOMWindow still has a frame after page-caching subframes
https://bugs.webkit.org/show_bug.cgi?id=195609

Reviewed by Chris Dumez.

r242677 added release assertions to DOMWindow::suspendForPageCache. But when the first release assert in
that function is hit, we still can't tell whether active DOM objects are detaching frames, or if creating
CachedFrame's on one of subframes is causing the frame to go way.

Add a release assertion immediately after creating CachedFrame on subframes to detect this case.

* history/CachedFrame.cpp:
(WebCore::CachedFrame::CachedFrame):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (242796 => 242797)


--- trunk/Source/WebCore/ChangeLog	2019-03-12 16:40:31 UTC (rev 242796)
+++ trunk/Source/WebCore/ChangeLog	2019-03-12 16:50:46 UTC (rev 242797)
@@ -1,3 +1,19 @@
+2019-03-12  Ryosuke Niwa  <[email protected]>
+
+        In CachedFrame's constructor, release-assert that DOMWindow still has a frame after page-caching subframes
+        https://bugs.webkit.org/show_bug.cgi?id=195609
+
+        Reviewed by Chris Dumez.
+
+        r242677 added release assertions to DOMWindow::suspendForPageCache. But when the first release assert in
+        that function is hit, we still can't tell whether active DOM objects are detaching frames, or if creating
+        CachedFrame's on one of subframes is causing the frame to go way.
+
+        Add a release assertion immediately after creating CachedFrame on subframes to detect this case.
+
+        * history/CachedFrame.cpp:
+        (WebCore::CachedFrame::CachedFrame):
+
 2019-03-12  Zalan Bujtas  <[email protected]>
 
         [ContentChangeObserver] Stop content change observation when the touch event turns into long press

Modified: trunk/Source/WebCore/history/CachedFrame.cpp (242796 => 242797)


--- trunk/Source/WebCore/history/CachedFrame.cpp	2019-03-12 16:40:31 UTC (rev 242796)
+++ trunk/Source/WebCore/history/CachedFrame.cpp	2019-03-12 16:50:46 UTC (rev 242797)
@@ -147,6 +147,8 @@
     for (Frame* child = frame.tree().firstChild(); child; child = child->tree().nextSibling())
         m_childFrames.append(std::make_unique<CachedFrame>(*child));
 
+    RELEASE_ASSERT(m_document->domWindow()->frame());
+
     // Active DOM objects must be suspended before we cache the frame script data.
     m_document->suspend(ReasonForSuspension::PageCache);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to