Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: bb4fbe652ab8d2237260f5bde8558830e187e830
https://github.com/WebKit/WebKit/commit/bb4fbe652ab8d2237260f5bde8558830e187e830
Author: Basuke Suzuki <[email protected]>
Date: 2026-09-02 (Wed, 02 Sep 2026)
Changed paths:
M Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
Log Message:
-----------
[iOS] NetworkSessionCocoa::removeNetworkWebsiteData calls its
CompletionHandler off the main run loop
https://bugs.webkit.org/show_bug.cgi?id=323229
rdar://181302060
Reviewed by Ben Nham and Alex Christensen.
removeNetworkWebsiteData() constructs its CompletionHandler on the
NetworkProcess main run loop, but
invokes it from the reply block of -[UsageFeed
performNetworkDomainsActionWithOptions:reply:], which
Symptom delivers on a libdispatch worker thread. The construction-thread
assertion then fires:
ASSERTION FAILED: threadLikeAssertion.isCurrent()
The off-main call dates to bug 227045 (2021) and the construction-thread
assertion to bug 246271
(2022), but Release+ASAN builds compiled the check as a no-op until bug 309216
promoted
assertIsCurrent from ASSERT_UNUSED to ASSERT_WITH_SECURITY_IMPLICATION.
WebKitTestRunner now asserts
in the network process during startup, which blocks WebGL fuzzing. The path is
iOS-only because it
is guarded by ENABLE(APP_PRIVACY_REPORT), so macOS compiles the synchronous
#else stub instead.
Hop back to the main run loop before invoking the handler, the same pattern
already used by
NetworkDataTaskCocoa::setH2PingCallback.
Also fix the case where performNetworkDomainsActionWithOptions: cannot make the
request: the reply
block is then dropped without being invoked, so the CompletionHandler was
destroyed uncalled,
hanging the website data removal and tripping the "Completion handler should
always be called"
assertion. Wrapping it in a CompletionHandlerWithFinalizer makes it called
exactly once either way.
No new tests (the affected path needs the Symptom framework on an iOS device;
see the FIXME about
rdar://81420753 above it).
* Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::removeNetworkWebsiteData):
Canonical link: https://commits.webkit.org/320342@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications