RESOLVED FIXED Bug 239066
Expose workers as service worker clients and implement registration matching for dedicated workers
https://bugs.webkit.org/show_bug.cgi?id=239066
Summary Expose workers as service worker clients and implement registration matching ...
youenn fablet
Reported 2022-04-11 05:51:24 PDT
Expose workers as service worker clients and implement registration matching for dedicated workers
Attachments
Patch (80.34 KB, patch)
2022-04-11 06:58 PDT, youenn fablet
no flags
Patch (79.00 KB, patch)
2022-04-12 02:53 PDT, youenn fablet
ews-feeder: commit-queue-
Patch (90.36 KB, patch)
2022-04-12 10:36 PDT, youenn fablet
no flags
Patch (91.09 KB, patch)
2022-04-12 10:50 PDT, youenn fablet
no flags
Patch (89.62 KB, patch)
2022-04-12 10:52 PDT, youenn fablet
no flags
Patch (89.62 KB, patch)
2022-04-13 01:29 PDT, youenn fablet
no flags
Patch for landing (89.52 KB, patch)
2022-04-14 00:03 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2022-04-11 06:58:29 PDT
youenn fablet
Comment 2 2022-04-12 02:53:26 PDT
youenn fablet
Comment 3 2022-04-12 10:36:32 PDT
youenn fablet
Comment 4 2022-04-12 10:50:28 PDT
youenn fablet
Comment 5 2022-04-12 10:52:32 PDT
youenn fablet
Comment 6 2022-04-13 01:29:25 PDT
youenn fablet
Comment 7 2022-04-13 06:04:53 PDT
Comment on attachment 457513 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=457513&action=review > LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/worker-interception.https-expected.txt:7 > +FAIL Verify a cors worker script served by a service worker fails dedicated worker start. assert_equals: Expected error event, but got message event instead expected "error" but got "message" Fixed by https://bugs.webkit.org/show_bug.cgi?id=239123.
youenn fablet
Comment 8 2022-04-13 06:05:56 PDT
Follow-up patch should handle unregistering of workers and better handle blob workers.
Chris Dumez
Comment 9 2022-04-13 07:29:02 PDT
Comment on attachment 457513 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=457513&action=review r=me but I think there is a bug to fix before landing. > Source/WebCore/workers/WorkerGlobalScope.cpp:662 > + SWClientConnection& connection = swClientConnection(); Not sure why we need a local variable here. > Source/WebCore/workers/WorkerScriptLoader.cpp:50 > + static NeverDestroyed<HashMap<ScriptExecutionContextIdentifier, WorkerScriptLoader*>> map; Is this only used on the main thread? I assume so since I see no locking. If so, we should use MainThreadNeverDestroyed. > Source/WebCore/workers/service/SWClientConnection.cpp:244 > + updateController(*document, WTFMove(newController)); The WTFMove() here looks like a bug since we're in a for loop. > Source/WebCore/workers/service/SWClientConnection.cpp:248 > + worker->postTaskToWorkerGlobalScope([newController = WTFMove(newController).isolatedCopy()] (auto& context) mutable { ditto. > Source/WebCore/workers/service/ServiceWorkerClientData.cpp:72 > + if (is<Document>(context)) { if (auto* document = dynamicDowncast<Document>(context)) {
youenn fablet
Comment 10 2022-04-14 00:03:03 PDT
Created attachment 457599 [details] Patch for landing
EWS
Comment 11 2022-04-14 01:49:30 PDT
Committed r292861 (249632@main): <https://commits.webkit.org/249632@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 457599 [details].
Radar WebKit Bug Importer
Comment 12 2022-04-14 01:50:22 PDT
Note You need to log in before you can comment on or make changes to this bug.