You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An installing worker does not persist but discarded. If the installing worker was the only service worker for the service worker registration, the service worker registration is discarded.
If registration's installing worker installingWorker is not null, then:
If the result of running Get Newest Worker with registration is installingWorker, invoke Clear Registration with registration and continue to the next iteration of the loop.
According to the algorithm, when we call Get Newest Worker, we're always going to get the installingWorker. Step 1 checks if the registration's installing worker installingWorker is not null and the Get Newest Worker returns newestWorker which is going to be the registration's installing worker since the installing worker is not null.
This can be a problem since that means we are always invoking Clear Registration regardless if we have an installing worker (even if there's an active worker).
Ohhh haha yeah. I'm pretty sure that "Get Newest Worker" should be intending to get the oldest worker, as in the active worker. Is that right @jungkees?
2.6 User Agent Shutdown states that:
In contrast, the User Agent Shutdown Algorithm states that:
According to the algorithm, when we call Get Newest Worker, we're always going to get the installingWorker. Step 1 checks if the registration's installing worker installingWorker is not null and the Get Newest Worker returns newestWorker which is going to be the registration's installing worker since the installing worker is not null.
This can be a problem since that means we are always invoking Clear Registration regardless if we have an installing worker (even if there's an active worker).
cc editors: @jungkees @jakearchibald
The text was updated successfully, but these errors were encountered: