Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 54120658172b17a39be914fbbb0fbe6f812597b6
      
https://github.com/WebKit/WebKit/commit/54120658172b17a39be914fbbb0fbe6f812597b6
  Author: Zak Ridouh <[email protected]>
  Date:   2025-06-05 (Thu, 05 Jun 2025)

  Changed paths:
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebProcessPool.cpp
    M Source/WebKit/UIProcess/WebProcessPool.h
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm

  Log Message:
  -----------
  Fix some pages with COOP: same-origin header getting a same-site process 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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to