queue tasks to update attributes on ServiceWorker and ServiceWorkerRegistration

NEW
Unassigned

Status

()

defect
P3
normal
3 years ago
a year ago

People

(Reporter: bkelly, Unassigned)

Tracking

(Blocks 2 bugs)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: btpp-fixlater)

Attachments

(3 attachments, 3 obsolete attachments)

Currently the spec requires us to wait for statechange events to fire before activating directly after installation.  We probably need to wait for any statechange events any time .installing, .waiting, or .active are modified.  I have an issue for this:

  https://github.com/slightlyoff/ServiceWorker/issues/848

Currently we handle this by starting activate asynchronously.  Since we only fire statechange events on the main thread this ensures the event dispatch runnable has been flushed.  Once we implement bug 1113522, however, this will not be adequate.  We will need a more explicit async wait step.

Filing this to tackle after bug 1256428.
After thinking about this more I think we just need to implement something like this instead:

  https://github.com/slightlyoff/ServiceWorker/issues/860
Summary: explicitly wait for "statechange" events to fire → queue tasks to update attributes on ServiceWorker and ServiceWorkerRegistration
(Reporter)

Updated

3 years ago
Depends on: 1260591
These patches are all refactoring towards allowing us to update registrations cleanly when the state of the registration changes.  More refactoring to come.  I'm trying to keep the patches small, so there will be lots of them.
(Reporter)

Updated

3 years ago
Depends on: 1263307
(Reporter)

Updated

3 years ago
Attachment #8737367 - Attachment is obsolete: true
(Reporter)

Updated

3 years ago
Attachment #8737368 - Attachment is obsolete: true
(Reporter)

Updated

3 years ago
Attachment #8737369 - Attachment is obsolete: true
Unfortunately I won't have time to complete this before moving to another effort.  I moved the first 3 patches to bug 1263307 to land separately.  The remaining patches are a work-in-progress towards associating DOM ServiceWorkerRegistration objects directly with their backing ServiceWorkerRegistrationInfo objects.  Once that is done we could more easily fire update to keep attributes in sync.
Assignee: bkelly → nobody
Status: ASSIGNED → NEW
Note this should also fix this issue if its still a problem in our implementation:

  https://github.com/slightlyoff/ServiceWorker/issues/851
Also we should include this spec issue when this bug is fixed:

  https://github.com/slightlyoff/ServiceWorker/issues/848
Whiteboard: btpp-fixlater
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.