Bug 229720 - Add support for ServiceWorkerGlobalScope.serviceWorker
Summary: Add support for ServiceWorkerGlobalScope.serviceWorker
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Service Workers (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL: https://w3c.github.io/ServiceWorker/#...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-08-31 10:13 PDT by Chris Dumez
Modified: 2021-09-01 09:31 PDT (History)
14 users (show)

See Also:


Attachments
WIP patch (3.65 KB, patch)
2021-08-31 10:14 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
WIP patch (3.26 KB, patch)
2021-08-31 10:48 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
WIP patch (5.44 KB, patch)
2021-08-31 10:56 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
WIP patch (28.05 KB, patch)
2021-08-31 12:09 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (34.29 KB, patch)
2021-08-31 12:40 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (33.79 KB, patch)
2021-08-31 16:45 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (48.24 KB, patch)
2021-09-01 07:52 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2021-08-31 10:13:36 PDT
Add support for ServiceWorkerGlobalScope.serviceWorker:
- https://w3c.github.io/ServiceWorker/#dom-serviceworkerglobalscope-serviceworker
Comment 1 Chris Dumez 2021-08-31 10:14:08 PDT
Created attachment 436900 [details]
WIP patch
Comment 2 Chris Dumez 2021-08-31 10:48:20 PDT
Created attachment 436910 [details]
WIP patch
Comment 3 Chris Dumez 2021-08-31 10:56:00 PDT
Created attachment 436913 [details]
WIP patch
Comment 4 Chris Dumez 2021-08-31 12:09:24 PDT
Created attachment 436924 [details]
WIP patch
Comment 5 Chris Dumez 2021-08-31 12:40:04 PDT
Created attachment 436929 [details]
Patch
Comment 6 Chris Dumez 2021-08-31 16:45:37 PDT
Created attachment 436965 [details]
Patch
Comment 7 youenn fablet 2021-09-01 00:04:47 PDT
Comment on attachment 436965 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=436965&action=review

> Source/WebCore/workers/service/context/ServiceWorkerThread.cpp:81
> +    , m_workerData(crossThreadCopy(workerData))

We do not really need a ServiceWorkerContextData&& nor a ServiceWorkerData&&, except if we want to add a dedicated isolatedCopy() &&.

> LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/popup-coop-by-sw.https-expected.txt:1
> +CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: Load failed

This unhandled promise rejection may cause flakiness according EWS.
Can we update the test to make sure this des not happen?
Comment 8 Chris Dumez 2021-09-01 07:52:28 PDT
Created attachment 437027 [details]
Patch
Comment 9 EWS 2021-09-01 09:30:49 PDT
Committed r281854 (241186@main): <https://commits.webkit.org/241186@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 437027 [details].
Comment 10 Radar WebKit Bug Importer 2021-09-01 09:31:17 PDT
<rdar://problem/82632170>