Re: [w3c/ServiceWorker] Fix the perform the fetch steps in Update algorithm (#1175)

jungkees 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.

@domenic, I'm not sure if this change makes it better. My intention is to remove the Reject Job Promise call (here and other fail cases) within the perform the fetch steps and uniformly handle them in https://github.com/w3c/ServiceWorker/pull/1175/files#diff-27b79860afe28f01aed4f1f6228367faL2688. For this change, we need to change HTML as well to pass |error data| from the perform the fetch steps to fetch a * worker script to the post fetch steps.

-- 
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#pullrequestreview-51950502

Received on Tuesday, 25 July 2017 03:11:51 UTC