Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 497098e97dcc2b822e87cfb6b678a33757db96c9
https://github.com/WebKit/WebKit/commit/497098e97dcc2b822e87cfb6b678a33757db96c9
Author: Devin Rousso <[email protected]>
Date: 2026-09-17 (Thu, 17 Sep 2026)
Changed paths:
M Source/WebKit/UIProcess/ProcessThrottler.cpp
M Source/WebKit/UIProcess/ProcessThrottler.h
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/IndexedDBSuspendImminently.mm
Log Message:
-----------
IndexedDB transactions stall when reusing a service worker process without
RunningBoard
https://bugs.webkit.org/show_bug.cgi?id=324058
<rdar://problem/187349702>
Reviewed by Sihui Liu.
Without RunningBoard `ProcessThrottler::didConnectToProcess` is never called so
`ProcessThrottler::currentState` keeps reporting its initial
`ProcessThrottleState::Suspended` value.
When navigation reuses a standalone `ServiceWorker` WebProcess,
`WebProcessProxy::addExistingWebPage` passes that value to
`WebProcessProxy::didChangeThrottleState` to refresh NetworkProcess assertions.
This incorrectly marks the IndexedDB client suspended with no subsequent resume
notification to restart its transactions.
315609@main added the storage suspension notifications and 319873@main made the
scheduler defer queued transactions while the client is suspended.
The incorrect state also affects other readers, including the foreground flag
reported by `WebProcessProxy::didExceedMemoryFootprintThreshold`.
Correct the state at its source rather than making one caller ignore it,
preserving the assertion refresh introduced by 263031@main when a
`ServiceWorker` WebProcess gains a page without changing `ProcessThrottleState`.
* Source/WebKit/UIProcess/ProcessThrottler.h:
* Source/WebKit/UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::setThrottleState):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/IndexedDBSuspendImminently.mm:
(testTransactionAfterCrossSiteNavigationWithServiceWorker): Added.
(TEST(IndexedDB, TransactionAfterCrossSiteNavigationWithServiceWorker)): Added.
(TEST(IndexedDB,
TransactionAfterCrossSiteNavigationWithServiceWorkerWithoutPageCache)): Added.
Canonical link: https://commits.webkit.org/321356@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications