Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c73014505affe2bd1a831719b86068cc07dcde4a
      
https://github.com/WebKit/WebKit/commit/c73014505affe2bd1a831719b86068cc07dcde4a
  Author: Ben Nham <[email protected]>
  Date:   2026-08-20 (Thu, 20 Aug 2026)

  Changed paths:
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M TestExpectations/apitests

  Log Message:
  -----------
  REGRESSION(318650@main): process swap on navigation response can reuse a 
process that already hosts the navigating page
https://bugs.webkit.org/show_bug.cgi?id=321947
rdar://185124281

Reviewed by Per Arne Vollan.

After 318650@main, we now mark the site for processes associated with a process 
swap on navigation
response correctly (e.g. swap due to COOP response header or forced 
EnhancedSecurity mode). This
means findReusableSuspendedPageProcess can now select those processes for 
reuse, while it could not
in the past.

This causes issues if one of those processes is subsequently selected for reuse 
in
performProcessSwapForNavigationResponse. That method does not clear suspended 
pages associated with
the current navigating page from the destination WebProcess. This can leave the 
destination
WebProcess in a state where it has both a suspended WebPage and a non-suspended 
WebPage associated
with the same identifier, which causes multiple asserts to trip in debug API 
tests.

Fix this by making performProcessSwapForNavigationResponse clear any suspended 
pages from the
process completing the navigation. This replicates logic that already exists in
decidePolicyForNavigationAction.

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedNavigationActionPolicyDecision):
(WebKit::WebPageProxy::removeSuspendedPagesBeforeNavigation):
(WebKit::WebPageProxy::performProcessSwapForNavigationResponse):
* Source/WebKit/UIProcess/WebPageProxy.h:
* TestExpectations/apitests:

Canonical link: https://commits.webkit.org/319571@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to