Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7d0d43fa56ea5b4b7d036bfac65ad19dfcf0f92e
https://github.com/WebKit/WebKit/commit/7d0d43fa56ea5b4b7d036bfac65ad19dfcf0f92e
Author: Ben Nham <[email protected]>
Date: 2026-08-03 (Mon, 03 Aug 2026)
Changed paths:
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm
M Source/WebKit/UIProcess/SuspendedPageProxy.cpp
M Source/WebKit/UIProcess/SuspendedPageProxy.h
M Source/WebKit/UIProcess/WebProcessActivityState.cpp
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm
Log Message:
-----------
Site-isolated iframe processes keep a page load assertion after a cross-site
navigation
https://bugs.webkit.org/show_bug.cgi?id=320790
rdar://183676310
Reviewed by Per Arne Vollan.
We are seeing that remote frame processes are running too long after a main
frame navigation due to
the remote frame processes holding a page load activity (m_networkActivity in
WebProcessActivityState).
The reason for this is that 304180@main removed the line that resets the page
load activity in
`WebProcessActivityState::reset`. It notes that this is not necessary because
NavigationState has a
timer that resets the page load activity. However, that timer doesn't work,
since it resets the
activity on all remote pages associated with the browsing context group
post-navigation. The page
load activity is actually held by remote pages associated with the old
pre-navigation browsing
context group.
The old BrowsingContextGroup is kept alive by the multi-process back/forward
cache (via
SuspendedPageProxy), so remote frame processes end up running with this
orphaned page load activity
for much longer than expected (until they get evicted out of the B/F cache).
Fix this by dropping the page load activity in `WebProcessActivityState::reset`.
This shouldn't re-regress the original issue 304180@main was trying to fix,
since the other part of
304180@main (checking for isLoading instead of checking
hasValidNetworkActivity) should be
sufficient for fixing the original issue.
* Source/WebKit/UIProcess/WebProcessActivityState.cpp:
(WebKit::WebProcessActivityState::reset):
Canonical link: https://commits.webkit.org/318458@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications