⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 242797 in webkit


Ignore:
Timestamp:
Mar 12, 2019, 9:50:46 AM (7 years ago)
Author:
rniwa@webkit.org
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r242796 r242797  
     12019-03-12  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        In CachedFrame's constructor, release-assert that DOMWindow still has a frame after page-caching subframes
     4        https://bugs.webkit.org/show_bug.cgi?id=195609
     5
     6        Reviewed by Chris Dumez.
     7
     8        r242677 added release assertions to DOMWindow::suspendForPageCache. But when the first release assert in
     9        that function is hit, we still can't tell whether active DOM objects are detaching frames, or if creating
     10        CachedFrame's on one of subframes is causing the frame to go way.
     11
     12        Add a release assertion immediately after creating CachedFrame on subframes to detect this case.
     13
     14        * history/CachedFrame.cpp:
     15        (WebCore::CachedFrame::CachedFrame):
     16
    1172019-03-12  Zalan Bujtas  <zalan@apple.com>
    218
  • trunk/Source/WebCore/history/CachedFrame.cpp

    r237266 r242797  
    148148        m_childFrames.append(std::make_unique<CachedFrame>(*child));
    149149
     150    RELEASE_ASSERT(m_document->domWindow()->frame());
     151
    150152    // Active DOM objects must be suspended before we cache the frame script data.
    151153    m_document->suspend(ReasonForSuspension::PageCache);
Note: See TracChangeset for help on using the changeset viewer.