-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use correct top origin when checking firstPartyForCookies with site i…
…solation enabled https://bugs.webkit.org/show_bug.cgi?id=272373 rdar://126114826 Reviewed by Charlie Wolfe and Sihui Liu. There were two issues here: 1. Document::topOrigin was using topDocument() to get the SecurityOrigin, and with site isolation enabled the top document isn't necessarily the main frame's Document. Instead, use a strategy like we do with mainFrameURL where the Page has the main frame's origin in all processes, whether the main frame is remote or not. 2. In WebProcessPool::processForNavigation when navigating the main frame, use the RegistrableDomain from the navigation instead of the PageLoadState, which may not have the activeURL yet. With these 2 changes, we stop getting failures in NetworkProcess::allowsFirstPartyForCookies in 2 tests when run with --site-isolation. The tests change from crashes to regular time-outs. * LayoutTests/platform/mac-site-isolation/TestExpectations: * Source/WebCore/dom/Document.cpp: (WebCore::Document::topOrigin const): * Source/WebCore/dom/Document.h: * Source/WebCore/page/Page.cpp: (WebCore::Page::setMainFrameURL): (WebCore::Page::mainFrameOrigin const): * Source/WebCore/page/Page.h: * Source/WebCore/page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::opaqueOrigin): * Source/WebCore/page/SecurityOrigin.h: * Source/WebKit/UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::processForNavigation): Canonical link: https://commits.webkit.org/277331@main
- Loading branch information
1 parent
8d0f6f9
commit e8a014a
Showing
8 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters