- From: Domenic Denicola <notifications@github.com>
- Date: Fri, 04 Aug 2017 23:29:56 +0000 (UTC)
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/ServiceWorker/pull/1175/review/54498053@github.com>
domenic commented on this pull request. > @@ -2656,17 +2656,15 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe 1. If the [=fetching scripts/is top-level=] flag is unset, then return the result of [=/fetching=] |request|. 1. Set |request|'s [=request/redirect mode=] to "<code>error</code>". 1. [=/Fetch=] |request|, and asynchronously wait to run the remaining steps as part of fetch's <a>process response</a> for the [=/response=] |response|. - 1. [=Extract a MIME type=] from the |response|'s [=response/header list=]. If this MIME type (ignoring parameters) is not a [=JavaScript MIME type=], then: - 1. Invoke [=Reject Job Promise=] with |job| and "{{SecurityError}}" {{DOMException}}. - 1. Asynchronously complete these steps with a [=network error=]. + 1. Let |mimeType| be the result of [=extracting a MIME type=] from the |response|'s [=response/header list=]. + 1. If |mimeType| (ignoring parameters) is not a [=JavaScript MIME type=], asynchronously complete these steps with a [=network error=] and "{{SecurityError}}" {{DOMException}}, and abort these steps. Hmm, yeah, this is pretty invasive. I think the "another option" is probably better. However note that rejecting a promise that's already resolved (including being rejected) is a no-op. So maybe things are already fine? Or is it important to avoid the equivalentJob stuff too? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/ServiceWorker/pull/1175#discussion_r131505080
Received on Friday, 4 August 2017 23:30:18 UTC