Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b9ad587b896421cdd72bcee39f1390fc9d6e9421
https://github.com/WebKit/WebKit/commit/b9ad587b896421cdd72bcee39f1390fc9d6e9421
Author: Sihui Liu <[email protected]>
Date: 2026-09-09 (Wed, 09 Sep 2026)
Changed paths:
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/IndexedDBSuspendImminently.mm
Log Message:
-----------
NEW TEST(319873@main): [iOS]
TestWebKitAPI.IndexedDB.TransactionOfSuspendedProcessIsNotAbortedByItsOwnQueuedTransaction
https://bugs.webkit.org/show_bug.cgi?id=323702
rdar://186958391
Reviewed by Jonathan Bedard and Brady Eidson.
This test creates a single WKWebView/WebProcess and fakes it into the Suspended
throttle state via
_setThrottleStateForTesting to exercise the "a suspended client's in-progress
transaction is not aborted just because
its own queued transaction is blocked on it" logic in UniqueIDBDatabase. On
iOS, dropping that WebProcess's
foreground/background tokens can, since it is the only WebProcess in the pool,
drop the NetworkProcess's own last
foreground/background assertion as well, causing the real NetworkProcess
ProcessThrottler to suspend the NetworkProcess.
A real NetworkProcess suspend runs
IDBStorageManager::stopDatabaseActivitiesForSuspend(), which unconditionally
aborts
every in-progress transaction's backing store transaction via
UniqueIDBDatabase::abortActiveTransactions() so the
process can safely release its SQLite file locks; this is an intentional,
unrelated mechanism to prevent holding a lock
while suspended, not the suspended-client logic under test.
So the test's outcome ends up depending on whether the NetworkProcess happens
to receive a real suspend during the
test's timing window, which is unrelated to what the test is meant to verify.
Fix this by keeping a second WebView (and
therefore a second WebProcess) alive and foregrounded for the duration of the
test, so the NetworkProcess always has a
live foreground/background assertion from that second WebProcess.
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/IndexedDBSuspendImminently.mm:
(TransactionOfSuspendedProcessIsNotAbortedByItsOwnQueuedTransaction)):
Canonical link: https://commits.webkit.org/320767@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications