Re: [w3c/ServiceWorker] Clarify "uncaught runtime script error". (#1346)

jungkees commented on this pull request.



> @@ -2481,8 +2482,8 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
           1. Set |worker|'s [=script resource map=][|url|] to |response|.
       1. Set |worker|'s <a>script resource</a>'s <a>HTTPS state</a> to |httpsState|.
       1. Set |worker|'s <a>script resource</a>'s [=script resource/referrer policy=] to |referrerPolicy|.
-      1. Invoke <a>Run Service Worker</a> algorithm given |worker|, and with the *force bypass cache for importscripts flag* set if |job|'s [=job/force bypass cache flag=] is set.
-      1. If an uncaught runtime script error occurs during the above step, then:
+      1. Let |promise| be the result of invoking the [=Run Service Worker=] algorithm given |worker|, and with the *force bypass cache for importscripts flag* set if |job|'s [=job/force bypass cache flag=] is set.
+      1. [=upon fulfillment|Upon fulfillment=] of |promise| with value |evaluationStatus|, if |evaluationStatus| is an [=abrupt completion=] or |evaluationStatus|.\[[Value]] is empty, then:

I think the Invoke Install in the next step will run without waiting for this fulfillment handler being called. And making Run Service Worker resolve the promise from within yet another parallel thread seems not precise I guess. How is the implementation actually handling the uncaught service worker script error during update? Does it use a callback or something to notify the error and stop the execution before continuing to install?

-- 
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/1346#pullrequestreview-147471211

Received on Sunday, 19 August 2018 21:22:49 UTC