New issue
Advanced search Search tips

Issue 678899 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Duplicate importScripts() calls for an installing worker should read the stored version

Project Member Reported by falken@chromium.org, Jan 6 2017

Issue description

When a service worker does:
importScripts('a.js');  // (1)
importScripts('a.js');  // (2)
Currently we do network fallback for (2). The current spec says "last one wins" which means (2) should be stored. However, I think storing (1) and having (2) read (1) is nicer behavior. According to https://github.com/w3c/ServiceWorker/issues/1041, Firefox does this and there is support to do it that way. So I'll do that way.

This is expected to have no real-world impact but it's nice as part of fixing  bug 485900 .
 
Note: I verified that Firefox passes the tests added at https://codereview.chromium.org/2602853002/

Comment 2 by bke...@mozilla.com, Jan 6 2017

Thanks!  I was making an educated guess about our behavior in firefox, but had not checked.  Happy to have confirmation.

Comment 3 by falken@chromium.org, Jan 16 2017

Status: Fixed (was: Started)
This landed in 57.0.2978.0 but bugdroid didn't catch it:
https://chromium.googlesource.com/chromium/src/+/815dc48c9d00b0142a2421de8f10b7cb9c5b34ab

Sign in to add a comment