Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 66c0b678a65f5e9bdd76f466d40ceb38c68b8285
https://github.com/WebKit/WebKit/commit/66c0b678a65f5e9bdd76f466d40ceb38c68b8285
Author: Youenn Fablet <[email protected]>
Date: 2026-04-13 (Mon, 13 Apr 2026)
Changed paths:
M Source/WebKit/WebProcess/Extensions/Bindings/JSWebExtensionWrapper.cpp
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtensionAPIExtension.mm
Log Message:
-----------
Handle WebExtension pending tasks when worker gets stopped
rdar://174046043
https://bugs.webkit.org/show_bug.cgi?id=311938
Reviewed by Chris Dumez.
We usually queue a task when going back to a worker from IPC.
This handles automatically the case of worker being terminated.
For web extension workers, we need to explicitly check the case of worker being
terminated.
We do so in callWithArguments.
Covered by a test which is creating a web extension service worker that is
doing nothing but triggering a pending task everytime the previous one is
completed.
We then terminate the service worker, the test is passing as long as the web
process is not crashing.
Test: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIExtension.mm
* Source/WebKit/WebProcess/Extensions/Bindings/JSWebExtensionWrapper.cpp:
(WebKit::callWithArguments):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIExtension.mm:
(TestWebKitAPI::TEST(WKWebExtensionAPIExtension,
HandlePendingExtensionTasksWhileStopped)):
(TestWebKitAPI::TEST(WKWebExtensionAPIExtension,
GetViewsExcludesServiceWorkerBackground)): Deleted.
Canonical link: https://commits.webkit.org/311071@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications