Re: [w3c/ServiceWorker] Don't fail update upon error fetching the incumbent worker's import s… (#1377)

wanderview commented on this pull request.



>          1. If |response|’s [=response/cache state=] is not "`local`", set |registration|’s [=service worker registration/last update check time=] to the current time.
-        1. [=Extract a MIME type=] from the |response|'s [=response/header list=]. If this MIME type (ignoring parameters) is not a [=JavaScript MIME type=], return a [=network error=].
-        1. If |response|'s [=response/type=] is not "`error`", and |response|'s [=response/status=] is an <a>ok status</a>, then:
-            1. [=map/Set=] |serviceWorker|'s [=script resource map=][|request|'s [=request/url=]] to |response|.
-            1. Set |serviceWorker|'s [=classic scripts imported flag=].

I'm not sure this matches the behavior implemented in firefox.  Gecko treats errors importScripts as "no change" in the update algorithm:

https://searchfox.org/mozilla-central/rev/c21d6620d384dfb13ede6054015da05a6353b899/dom/serviceworkers/ServiceWorkerScriptCache.cpp#725-729


There is some discussion in the bug about why this was chosen here:

https://bugzilla.mozilla.org/show_bug.cgi?id=1290951#c16


@asutherland, what do you think about this PR?

-- 
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/1377#discussion_r248306405

Received on Wednesday, 16 January 2019 14:40:34 UTC