Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1d52468044ba98b84efacd3e0f06c6447e5803d2
https://github.com/WebKit/WebKit/commit/1d52468044ba98b84efacd3e0f06c6447e5803d2
Author: Sihui Liu <[email protected]>
Date: 2026-01-21 (Wed, 21 Jan 2026)
Changed paths:
M Source/WebKit/UIProcess/WebProcessPool.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm
Log Message:
-----------
[Site Isolation] Only reuse source process for navigation if process's site
matches target URL
https://bugs.webkit.org/show_bug.cgi?id=305814
rdar://168479638
Reviewed by Alex Christensen.
In the case of the new test, the same web process will be picked for both
navigations to webkit.org and example.com, and
the assertion in `WebProcessProxy::didStartUsingProcessForSiteIsolation()` will
fail because we reuse the process of
webkit.org for example.com. The cause is:
`WebProcessPool::processForNavigationInternal()` will reuse source process if
source URL is empty (in this case, source URL is empty because there's no
committed load, and the navigation to
example.com is a redirect). However, source process's site is set when it is
picked for navigation, and it is not
supposed to be used for other site after. To fix the failure, this patch makes
`processForNavigationInternal()` only
return source process if source process's site matches target site.
API test: SiteIsolation.InitialNavigationRedirect
* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigationInternal):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm:
(TestWebKitAPI::TEST(SiteIsolation, InitialNavigationRedirect)):
Canonical link: https://commits.webkit.org/305948@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications