[w3c/ServiceWorker] Should add a “script type” check in the register algorithm. (#1359)

In the current spec, we finish a new register job when it equals _newestWorker_. Spec says ([Register 5. 3.](https://w3c.github.io/ServiceWorker/#register-algorithm) ): 
> 3. If newestWorker is not null, **job’s script url equals newestWorker’s script url, and job’s update via cache mode's value equals registration’s update via cache mode**, then:
>  1. Invoke Resolve Job Promise with job and registration.
>  2. Invoke Finish Job with job and abort these steps.

However, a new register job should be alive when its script url/update via cache equal newestWorker’s ones but its script type does not equal newestWorker’s one. I think script type should also be checked. 


-- 
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/issues/1359

Received on Thursday, 4 October 2018 05:49:22 UTC