Remove allowed failure in /service-workers/service-worker/skip-waiting-installed.https.html once ServiceWorker lifecycle events go directly from PBackground to workers
Categories
(Core :: DOM: Service Workers, task)
Tracking
()
People
(Reporter: asuth, Unassigned)
References
Details
With bug 1113522 we're able to run skip-waiting-installed.https.html but we encounter an intermittent failure captured in this pernosco trace where from the perspective of the main thread we are doing:
- send lifecycle "activate" event
- resolve skipWaiting promise
but in the content process we sometimes see: - skipWaiting promise resolved
- "activate" event fired
This is due to the thread journeys currently looking like:
- activate event: parent process main thread -> parent process pbackground thread -> content process worker launcher thread -> content process main thread -> content process worker thread
- skipwaiting promise: parent process main thread -> parent process pbackground thread -> content process worker thread
This allows for a race that can and will happen.
After bug 1672493 lands the thread journeys will be the same although they will happen via different toplevel protocols, but I believe this should still provide us with a consistent ordering given the event targets in use.
I'm addressing this race in bug 1113522 by making a failure of skipWaiting when a installed worker is waiting - assert_equals: skipWaiting promise should be resolved with undefined expected "PASS" but got "FAIL: Promise should be resolved after activate event is dispatched" allowed rather than adding additional machinery to try and compensate for this given that bug 1672493 should be able to land soon as it's just review comments that I think have an easy way to be addressed outstanding.
Description
•