Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e5c4d1be155f3789cd6e75c5ee34e13169ce059e
https://github.com/WebKit/WebKit/commit/e5c4d1be155f3789cd6e75c5ee34e13169ce059e
Author: Zak Ridouh <[email protected]>
Date: 2026-05-20 (Wed, 20 May 2026)
Changed paths:
M LayoutTests/platform/mac-wk2/TestExpectations
M Source/WebKit/WebProcess/WebPage/WebFrame.cpp
Log Message:
-----------
[Site Isolation] Don't seed new RemoteFrame with the dying LocalFrame's stale
FrameTreeSyncData
https://bugs.webkit.org/show_bug.cgi?id=315216
rdar://177546607
Reviewed by Sihui Liu.
In WebFrame::loadDidCommitInAnotherProcess, the new RemoteFrame was
seeded with the dying LocalFrame's FrameTreeSyncData, whose
frameDocumentSecurityOrigin reflects the pre-swap document, not
the cross-origin document the frame is navigating to. The
post-commit FrameTreeSyncDataChangedInAnotherProcess IPC arrives
shortly to refresh this, but any task that queries the remote
window in the meantime (e.g. a BroadcastChannel dispatch fired from
pagehide) can observe a cached origin that spuriously matches the
active document. BindingSecurity correctly denies the access (the
target is remote), but DOMWindow::crossDomainAccessErrorMessage
then asserts that active and target origins are not
same-origin-domain, which flakily crashes the
http/tests/site-isolation/page-lifecycle/{pagehide,pageswap,unload}.html
tests.
Seed the new RemoteFrame with an empty FrameTreeSyncData (opaque
origin) instead, matching the pattern already used by
WebFrame::createSubframe and WebFrameProxy::remoteProcessDidTerminate.
The post-commit broadcast still arrives via the same IPC connection
and supplies the real new values; until then, opaque is an honest
"unknown" placeholder that never compares same-origin.
Remove the tests from the flakey expectations.
* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WebKit/WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::loadDidCommitInAnotherProcess):
Canonical link: https://commits.webkit.org/313620@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications