Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e6aef05fba5a855dfb0e77e58e7f7d9d0eee3ed9
https://github.com/WebKit/WebKit/commit/e6aef05fba5a855dfb0e77e58e7f7d9d0eee3ed9
Author: Charlie Wolfe <[email protected]>
Date: 2026-10-13 (Tue, 13 Oct 2026)
Changed paths:
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebProcessPool.cpp
M Source/WebKit/UIProcess/WebProcessPool.h
M Source/WebKit/UIProcess/WebProcessProxy.cpp
M Source/WebKit/UIProcess/WebProcessProxy.h
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/ProcessSwapOnNavigation.mm
Log Message:
-----------
Start navigations in a cached COOP process before the response arrives
https://bugs.webkit.org/show_bug.cgi?id=327222
rdar://189790518
Reviewed by Ben Nham.
A COOP-switched process is cached for its origin, but it was only reused once
the response's COOP
header triggered the browsing context group switch. Until then the navigation
started in another
process, so the cached one sat idle.
For a main frame navigation to an HTTP(S) origin, take the cached COOP process
for that origin up
front and mark its COOP cache origin as unconfirmed.
If the response triggers a browsing context group switch to the same origin,
the provisional process
is reused even though it has committed the cached origin's main frame load. If
the navigation
commits without a switch, the process stays cached while its main frame stays
on that origin. If the
navigation ends without committing, or redirects to another origin, the
unconfirmed state is cleared
so it doesn't leak into later uses of the process.
~1.7% PLT improvement.
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::canReuseProvisionalProcessForBrowsingContextGroupSwitch):
(WebKit::WebPageProxy::triggerBrowsingContextGroupSwitchForNavigation):
* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForSite):
(WebKit::WebProcessPool::processForNavigationInternal):
* Source/WebKit/UIProcess/WebProcessPool.h:
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::setCOOPCacheOrigin):
(WebKit::WebProcessProxy::markCOOPCacheOriginAsUnconfirmed):
(WebKit::WebProcessProxy::setIsInProcessCache):
(WebKit::WebProcessProxy::removeProvisionalPageProxy):
(WebKit::WebProcessProxy::didCommitMainFrameLoad):
* Source/WebKit/UIProcess/WebProcessProxy.h:
Canonical link: https://commits.webkit.org/323631@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications