Fix some pages with COOP: same-origin header getting a same-site process from cache#45664
Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom Jun 5, 2025
zakariaridouh:eng/Fix-some-pages-with-COOP-same-origin-header-getting-a-same-site-process-from-cache
Conversation
Collaborator
|
EWS run on previous version of this PR (hash 2cdba2b) Details |
2cdba2b to
4883b51
Compare
Collaborator
|
EWS run on previous version of this PR (hash 4883b51) Details |
cdumez
reviewed
May 22, 2025
cdumez
reviewed
May 22, 2025
4883b51 to
7acf47d
Compare
Collaborator
|
EWS run on previous version of this PR (hash 7acf47d) Details |
achristensen07
requested changes
Jun 3, 2025
charliewolfe
reviewed
Jun 3, 2025
Member
There was a problem hiding this comment.
@cdumez How did this work before? Or hassame-origin never worked since COOP/COEP was implemented? Radar indicates this broke recently.
7acf47d to
6036b58
Compare
Collaborator
|
EWS run on previous version of this PR (hash 6036b58) Details |
cdumez
requested changes
Jun 5, 2025
6036b58 to
a081244
Compare
Collaborator
|
EWS run on previous version of this PR (hash a081244) Details
|
a081244 to
f829edf
Compare
Collaborator
|
EWS run on previous version of this PR (hash f829edf) Details |
cdumez
approved these changes
Jun 5, 2025
f829edf to
c46311f
Compare
Collaborator
|
EWS run on previous version of this PR (hash c46311f) Details |
cdumez
reviewed
Jun 5, 2025
c46311f to
0f9f28b
Compare
Collaborator
|
EWS run on current version of this PR (hash 0f9f28b) Details |
…ess from cache https://bugs.webkit.org/show_bug.cgi?id=293321 rdar://150643925 Reviewed by Chris Dumez. We have an issue in our process selection system for loading pages, where if we have a suspended process of a certain site, we sometimes end up giving that process to a new site that is same domain, but different origin. If this site also has a Cross-Origin-Opener-Policy: same-origin header, we end up in a process swapping loop where we keep trying to get a new process to load in to satisfy our policy, but keep getting handed a process that we can't load in. Fix this by disqualifying COOP + COEP process swaps from eligibility in participating in process cache selection. Also, added an API test to verify this fixed logic. * Source/WebKit/UIProcess/SuspendedPageProxy.cpp: (WebKit::SuspendedPageProxy::findReusableSuspendedPageProcess): (WebKit::SuspendedPageProxy::create): (WebKit::SuspendedPageProxy::SuspendedPageProxy): * Source/WebKit/UIProcess/SuspendedPageProxy.h: * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::suspendCurrentPageIfPossible): (WebKit::WebPageProxy::triggerBrowsingContextGroupSwitchForNavigation): * Source/WebKit/UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::processForSite): * Source/WebKit/UIProcess/WebProcessPool.h: * Source/WebKit/UIProcess/WebProcessProxy.cpp: * Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: ((ProcessSwap, MultitabCOOPSwapSameOriginProcessPool)): Canonical link: https://commits.webkit.org/295891@main
0f9f28b to
5412065
Compare
Collaborator
|
Committed 295891@main (5412065): https://commits.webkit.org/295891@main Reviewed commits have been landed. Closing PR #45664 and removing active labels. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🛠 vision-sim
5412065
0f9f28b
🛠 win🧪 win-tests🧪 ios-wk2🧪 ios-wk2-wpt🧪 api-ios🧪 mac-AS-debug-wk2🧪 gtk-wk2🧪 vision-wk2🛠 playstation🛠 mac-safer-cpp