Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b5c988402057fdfe3e319fff027bb18dce94baae
https://github.com/WebKit/WebKit/commit/b5c988402057fdfe3e319fff027bb18dce94baae
Author: Sihui Liu <[email protected]>
Date: 2026-01-29 (Thu, 29 Jan 2026)
Changed paths:
M Source/WebKit/UIProcess/API/APIPageConfiguration.cpp
M Source/WebKit/UIProcess/API/APIPageConfiguration.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebProcessPool.cpp
Log Message:
-----------
[Site Isolation] Fix WebLocks.LockRequestWaitingOnAnotherPageInSameProcess
https://bugs.webkit.org/show_bug.cgi?id=306201
rdar://168857642
Reviewed by Alex Christensen.
The test fails because it uses `_relatedWebView` and expects two WebViews (one
related to another) use the same process
to load the same site. The current `_relatedWebView` implementation is kind of
broken under Site Isolation: it would
select the process from related page (see `WebProcessPool::createWebPage`) and
associate the process with a site that is
different from the related page's site when adding it to new browsing context
group (`WebPageProxy::initializeWebPage`).
The purpose of `_relatedWebView` is to make sure two WebViews share the same
process for every load request. Under Site
Isolation, one load might involve multiple processes, so there is no way to
implement it correctly, and we decided to
deprecated the SPI. However, there are still existing clients and it might be
important for them that the process is
still shared when two WebViews are loading the same site (as in the test). So,
this patch keeps that working by making
page uses related page's browsing context group.
* Source/WebKit/UIProcess/API/APIPageConfiguration.cpp:
(API::PageConfiguration::preferredBrowsingContextGroup const):
* Source/WebKit/UIProcess/API/APIPageConfiguration.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::getOrCreateBrowsingContextGroup):
(WebKit::m_pageForTesting):
(WebKit::WebPageProxy::launchProcess):
* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createWebPage):
Canonical link: https://commits.webkit.org/306438@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications