Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block import() in service workers #6395

Merged
merged 1 commit into from
Feb 22, 2021
Merged

Block import() in service workers #6395

merged 1 commit into from
Feb 22, 2021

Conversation

jakearchibald
Copy link
Contributor

@jakearchibald jakearchibald commented Feb 18, 2021

(See WHATWG Working Mode: Changes for more details.)

Spec work for w3c/ServiceWorker#1356.


/webappapis.html ( diff )

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why this uses "implements" rather than "is", but I guess it's okay.

@jakearchibald
Copy link
Contributor Author

Tests: web-platform-tests/wpt#27699

@domenic
Copy link
Member

domenic commented Feb 19, 2021

Can you restore the pull request template? In particular links showing multi-implementer support would be useful, since apparently Firefox and Safari currently support import() in service workers so this would be a change for them. Also they'll need browser bugs.

@annevk
Copy link
Member

annevk commented Feb 19, 2021

Firefox is supportive, FWIW. cc @codehag

@jakearchibald
Copy link
Contributor Author

@domenic

Can you restore the pull request template? In particular links showing multi-implementer support would be useful, since apparently Firefox and Safari currently support import() in service workers so this would be a change for them.

Done, sorry about that.

Also they'll need browser bugs.

I usually file those just-before-merging (in case there's any changes through discussion beforehand).

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like folks are on board with this; merging! Please file bugs and edit the OP when they're ready.

@domenic domenic merged commit 25d7190 into main Feb 22, 2021
@domenic domenic deleted the block-import-in-sw branch February 22, 2021 17:12
jakearchibald added a commit to web-platform-tests/wpt that referenced this pull request Feb 24, 2021
webkit-commit-queue pushed a commit to WebKit/WebKit that referenced this pull request Mar 14, 2021
https://bugs.webkit.org/show_bug.cgi?id=222308

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Covering service-worker case.

* web-platform-tests/service-workers/service-worker/import-module-scripts.https-expected.txt:

Source/WebCore:

dynamic-import should be always rejected if script is executed in Worklets or ServiceWorkers.
This is recently changed in the spec whatwg/html#6395.

* bindings/js/ScriptModuleLoader.cpp:
(WebCore::isWorkletOrServiceWorker):
(WebCore::ScriptModuleLoader::importModule):

LayoutTests:

Covering worklet case.

* http/wpt/webaudio/the-audio-api/the-audioworklet-interface/dynamic-import-is-prohibited.https-expected.txt: Added.
* http/wpt/webaudio/the-audio-api/the-audioworklet-interface/dynamic-import-is-prohibited.https.html: Added.
* http/wpt/webaudio/the-audio-api/the-audioworklet-interface/processors/dynamic-import-is-prohibited.js: Added.
(DynamicImportIsProhibitedProcessor.prototype.process):
(DynamicImportIsProhibitedProcessor):


Canonical link: https://commits.webkit.org/235271@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274404 268f45cc-cd09-0410-ab3c-d52691b4dbfc
yury-s pushed a commit to yury-s/webkit-http that referenced this pull request Mar 15, 2021
https://bugs.webkit.org/show_bug.cgi?id=222308

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Covering service-worker case.

* web-platform-tests/service-workers/service-worker/import-module-scripts.https-expected.txt:

Source/WebCore:

dynamic-import should be always rejected if script is executed in Worklets or ServiceWorkers.
This is recently changed in the spec whatwg/html#6395.

* bindings/js/ScriptModuleLoader.cpp:
(WebCore::isWorkletOrServiceWorker):
(WebCore::ScriptModuleLoader::importModule):

LayoutTests:

Covering worklet case.

* http/wpt/webaudio/the-audio-api/the-audioworklet-interface/dynamic-import-is-prohibited.https-expected.txt: Added.
* http/wpt/webaudio/the-audio-api/the-audioworklet-interface/dynamic-import-is-prohibited.https.html: Added.
* http/wpt/webaudio/the-audio-api/the-audioworklet-interface/processors/dynamic-import-is-prohibited.js: Added.
(DynamicImportIsProhibitedProcessor.prototype.process):
(DynamicImportIsProhibitedProcessor):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@274404 268f45cc-cd09-0410-ab3c-d52691b4dbfc
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Mar 15, 2021
…estonly

Automatic update from web-platform-tests
No dynamic import in service worker (#27699)

Part of whatwg/html#6395 and w3c/ServiceWorker#1356
--

wpt-commits: a02460e35145989c6fe2365f03d1b0006f381d9d
wpt-pr: 27699
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Mar 15, 2021
…estonly

Automatic update from web-platform-tests
No dynamic import in service worker (#27699)

Part of whatwg/html#6395 and w3c/ServiceWorker#1356
--

wpt-commits: a02460e35145989c6fe2365f03d1b0006f381d9d
wpt-pr: 27699

UltraBlame original commit: 4f89a146b69c4b14730d2418cbac4447c6ac461a
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Mar 15, 2021
…estonly

Automatic update from web-platform-tests
No dynamic import in service worker (#27699)

Part of whatwg/html#6395 and w3c/ServiceWorker#1356
--

wpt-commits: a02460e35145989c6fe2365f03d1b0006f381d9d
wpt-pr: 27699

UltraBlame original commit: 4f89a146b69c4b14730d2418cbac4447c6ac461a
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Mar 15, 2021
…estonly

Automatic update from web-platform-tests
No dynamic import in service worker (#27699)

Part of whatwg/html#6395 and w3c/ServiceWorker#1356
--

wpt-commits: a02460e35145989c6fe2365f03d1b0006f381d9d
wpt-pr: 27699

UltraBlame original commit: 4f89a146b69c4b14730d2418cbac4447c6ac461a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants