Bug 222308 - Prevent dynamic import in service worker
Summary: Prevent dynamic import in service worker
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: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-02-23 04:09 PST by Jake Archibald
Modified: 2021-03-14 14:19 PDT (History)
11 users (show)

See Also:


Attachments
Patch (2.04 KB, patch)
2021-03-13 18:10 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (8.54 KB, patch)
2021-03-13 23:24 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (9.44 KB, patch)
2021-03-13 23:26 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jake Archibald 2021-02-23 04:09:50 PST
Spec change: https://github.com/whatwg/html/pull/6395
Tests: https://github.com/web-platform-tests/wpt/pull/27699
Context: https://github.com/w3c/ServiceWorker/issues/1356

Although this is a backwards-incompatible change for WebKit, Chrome never allowed import() in service workers, so I don't expect import() to be used much in the wild.
Comment 1 Radar WebKit Bug Importer 2021-03-02 04:10:14 PST
<rdar://problem/74922075>
Comment 2 Yusuke Suzuki 2021-03-13 18:10:16 PST
Created attachment 423111 [details]
Patch
Comment 3 Yusuke Suzuki 2021-03-13 23:24:52 PST
Created attachment 423116 [details]
Patch
Comment 4 Yusuke Suzuki 2021-03-13 23:26:54 PST
Created attachment 423117 [details]
Patch
Comment 5 youenn fablet 2021-03-14 04:00:14 PDT
Comment on attachment 423117 [details]
Patch

Would it be possible to resync the corresponding wpt tests Jake pointed out? Either there, or as a follow up.
Comment 6 Yusuke Suzuki 2021-03-14 14:15:06 PDT
(In reply to youenn fablet from comment #5)
> Comment on attachment 423117 [details]
> Patch
> 
> Would it be possible to resync the corresponding wpt tests Jake pointed out?
> Either there, or as a follow up.

This requires very large changes since we also need to update wpt tools etc... So for now, I didn't do that in that patch and wrote a test
Comment 7 EWS 2021-03-14 14:19:29 PDT
Committed r274404: <https://commits.webkit.org/r274404>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 423117 [details].