Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c02158ddf1c1e5111543c198d161383fb336ee45
https://github.com/WebKit/WebKit/commit/c02158ddf1c1e5111543c198d161383fb336ee45
Author: Ryosuke Niwa <[email protected]>
Date: 2026-09-21 (Mon, 21 Sep 2026)
Changed paths:
A
LayoutTests/fast/history/self-is-visited-after-cross-process-navigation-expected.txt
A
LayoutTests/fast/history/self-is-visited-after-cross-process-navigation.html
M LayoutTests/platform/ios-site-isolation/TestExpectations
M Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
M Source/WebKit/UIProcess/WebProcessProxy.cpp
M Source/WebKit/UIProcess/WebProcessProxy.h
Log Message:
-----------
[Site Isolation] Links stop being marked as visited after a cross-process
main frame navigation
https://bugs.webkit.org/show_bug.cgi?id=324725
Reviewed by Basuke Suzuki and Megan Gardner.
With site isolation enabled, fast/history/self-is-visited.html timed out
whenever
fast/history/saves-state-after-fragment-nav.html had run before it in the same
WebKitTestRunner: no link could be marked as visited any more.
WebProcessProxy::m_visitedLinkStoresWithUsers records which pages keep a process
registered with a VisitedLinkStore, and the process is added to the store when
its
first user appears and removed when its last one goes away. ProvisionalPageProxy
registered itself as a user only when site isolation was disabled, a workaround
added
in 288817@main to dodge ASSERT(!users.contains(pageID)), but both of the
matching
removals - in ~ProvisionalPageProxy and in WebProcessProxy::removeWebPage -
stayed
unconditional. So under site isolation a cross-process navigation removed a
user that
had never been added, and VisitedLinkStore::removeProcess tore down the process'
message receiver. The web process kept calling addVisitedLink and sending
AddVisitedLinkHashFromPage, but the UI process no longer had a receiver for it
and
dropped every one of them.
That assertion fired because the users of a store are deduplicated per page,
while a
page can legitimately register twice in one process, as a ProvisionalPageProxy
and a
RemotePageProxy. Count the registrations instead of deduplicating them, which
lets
ProvisionalPageProxy register unconditionally and makes the additions and
removals
balance again.
Test: fast/history/self-is-visited-after-cross-process-navigation.html
*
LayoutTests/fast/history/self-is-visited-after-cross-process-navigation-expected.txt:
Added.
* LayoutTests/fast/history/self-is-visited-after-cross-process-navigation.html:
Added.
Navigates the main frame to another process and back before checking the
visited link
styles, so this is caught by a single test rather than by an ordering dependency
between two.
* LayoutTests/platform/ios-site-isolation/TestExpectations:
* Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::initializeWebPage):
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addVisitedLinkStoreUser):
* Source/WebKit/UIProcess/WebProcessProxy.h:
* LayoutTests/platform/ios-site-isolation/TestExpectations:
Canonical link: https://commits.webkit.org/321572@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications