- From: Matt Falkenhagen <notifications@github.com>
- Date: Tue, 19 Jun 2018 15:25:42 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 19 June 2018 22:26:09 UTC
This change shouldn't regress the current spec: if it didn't deadlock before, it wouldn't deadlock now. If one does `waitUntil(skipWaiting())` in the install event handler, then `skipWaiting()` resolves immediately because Try Activate bails since waiting worker is null. This change only affects the case where `skipWaiting()` actually triggers activation. To trigger this behavior an installed worker needs to call `skipWaiting()`, i.e., in an onmessage event. I'm motivated to fix this because we would need to add some complexity to Chrome to guarantee the order per the current spec. I suspect sites would still deadlock if the spec didn't guard against it, e.g., with the Try Activate escape hatch. Another alternative is to just have `skipWaiting()` always resolve immediately. I am actually feeling that's more consistent. -- 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/1187#issuecomment-398565714
Received on Tuesday, 19 June 2018 22:26:09 UTC