Bug 195609

Summary: In CachedFrame's constructor, release-assert that DOMWindow still has a frame after page-caching subframes
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, cdumez, commit-queue, ews-watchlist, ggaren, koivisto, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Adds a release assert
none
Archive of layout-test-results from ews121 for ios-simulator-wk2 none

Description Ryosuke Niwa 2019-03-12 00:05:41 PDT
https://trac.webkit.org/changeset/242677 added release assertions to DOMWindow::suspendForPageCache.
But we still won't be able to tell whether active DOM objects are detaching frames,
or if creating CachedFrame on subframes is causing the frame to go way.

Add a release assertion immediately after creating CachedFrame for subframes to distinguish this case.
Comment 1 Ryosuke Niwa 2019-03-12 00:08:03 PDT
Created attachment 364362 [details]
Adds a release assert
Comment 2 EWS Watchlist 2019-03-12 02:30:27 PDT
Comment on attachment 364362 [details]
Adds a release assert

Attachment 364362 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/11470551

New failing tests:
imported/w3c/web-platform-tests/webrtc/simplecall.https.html
Comment 3 EWS Watchlist 2019-03-12 02:30:29 PDT
Created attachment 364372 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 4 Chris Dumez 2019-03-12 09:44:31 PDT
Comment on attachment 364372 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

Unrelated.
Comment 5 WebKit Commit Bot 2019-03-12 09:50:52 PDT
Comment on attachment 364362 [details]
Adds a release assert

Clearing flags on attachment: 364362

Committed r242797: <https://trac.webkit.org/changeset/242797>
Comment 6 WebKit Commit Bot 2019-03-12 09:50:54 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2019-03-12 09:51:33 PDT
<rdar://problem/48811192>
Comment 8 Chris Dumez 2019-05-03 15:37:42 PDT
Comment on attachment 364362 [details]
Adds a release assert

View in context: https://bugs.webkit.org/attachment.cgi?id=364362&action=review

> Source/WebCore/history/CachedFrame.cpp:150
> +    RELEASE_ASSERT(m_document->domWindow()->frame());

Getting hit (rdar://problem/49877867).