Bug 181103 - importScripts() inside a service worker should ensure that the response has a JavaScript MIME type
Summary: importScripts() inside a service worker should ensure that the response has a...
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:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-12-21 14:02 PST by Chris Dumez
Modified: 2017-12-22 13:24 PST (History)
6 users (show)

See Also:


Attachments
Patch (7.84 KB, patch)
2017-12-21 14:10 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (8.09 KB, patch)
2017-12-22 12:50 PST, 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 2017-12-21 14:02:26 PST
importScripts() inside a service worker should ensure that the response has a JavaScript MIME type, as per:
- https://w3c.github.io/ServiceWorker/#importscripts (step 6)
Comment 1 Chris Dumez 2017-12-21 14:10:09 PST
Created attachment 330065 [details]
Patch
Comment 2 youenn fablet 2017-12-21 21:16:05 PST
Comment on attachment 330065 [details]
Patch

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

> Source/WebCore/workers/WorkerGlobalScope.cpp:271
>          // FIXME: Fully implement https://w3c.github.io/ServiceWorker/#importscripts.

Is this FIXME still relevant? If so, can it be made more precise?

> LayoutTests/imported/w3c/ChangeLog:23
> +        * web-platform-tests/service-workers/service-worker/registration-mime-types.https-expected.txt:

Can we fix the test in this patch and submit a corresponding WPT PR.
If we discover during the PR that we should revert the test change, we could update our WebKit WPT test and our implementation in a follow-up patch.
Comment 3 Chris Dumez 2017-12-22 12:50:30 PST
Created attachment 330139 [details]
Patch
Comment 4 WebKit Commit Bot 2017-12-22 13:23:43 PST
Comment on attachment 330139 [details]
Patch

Clearing flags on attachment: 330139

Committed r226275: <https://trac.webkit.org/changeset/226275>
Comment 5 WebKit Commit Bot 2017-12-22 13:23:44 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2017-12-22 13:24:28 PST
<rdar://problem/36197500>