Closed Bug 1566563 Opened 5 years ago Closed 5 months ago

Resolve ready promise even if a script didn't request it

Categories

(Core :: DOM: Service Workers, defect, P3)

defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: perry, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: dom-lws-bugdash-triage)

The spec's activate algorithm, steps 6-7, state:

  1. Let matchedClients be a list of service worker clients whose creation URL matches registration’s scope url.
  2. For each client of matchedClients, queue a task on client’s responsible event loop, using the DOM manipulation task source, to run the following substeps:
    1. Let readyPromise be client’s global object's ServiceWorkerContainer object’s ready promise.
    2. If readyPromise is pending, resolve readyPromise with the the result of getting the service worker registration object that represents registration in readyPromise’s relevant settings object.

i.e., when a Service Worker transitions from the waiting to active state, all clients that associated (not necessarily controlled) with the worker's registration should have their ServiceWorkerContainer's ready promise resolved, even if those clients had not requested the ready promise via navigator.serviceWorker.ready. The current implementation only resolves the ready promise if it had already been asked for.

If this is fixed, subtest "resolve ready before unregistering and reregistering" of the service-workers/service-worker/ready.https.html WPT should pass.

Perry, can you help me set the priority here ? Thanks!

Assignee: nobody → perry
Priority: -- → P3
Assignee: perry → nobody
Severity: normal → S3
Whiteboard: dom-lws-bugdash-triage

Andrew suggested worksforme, so doing that

Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.