Open Bug 1595969 Opened 5 years ago Updated 2 years ago

Exposed orphaned registrations to devtools

Categories

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

enhancement

Tracking

()

People

(Reporter: asuth, Unassigned)

References

Details

In bug 1591101 we started actively tracking registrations that are unregistered but still have live workers in mOrphanedRegistrations.

We should expose these on nsIServiceWorkerManager somehow. Given how the ServiceWorkerRegistrationActorList operates, it might make the most sense to do something like:

  • expose an orphaned or unregistered boolean on nsIServiceWorkerRegistrationInfo
  • make SWM::GetAllRegistrations (which is nsISWM-specific) also returned registrations that live in mOrphanedRegistrations.
  • make sure we generate an nsIServiceWorkerRegistrationInfoListener generates a change event.
  • figure out what to do in terms of nsIServiceWorkerManagerListener and its onRegister/onUnregister notifications
    • devtools uses them both just as dirtying actions that triggers delta-checking logic, so it might be most pragmatic to change the listener semantics to match and fire the change notification whenever an orphaned registration is added or removed.

The other way is isomorphic-ish where we add getAllOrphanedRegistrations and make devtools track the extra state itself. I think the argument for the case above is if devtools holds onto a registration it can see the unregistered-ness directly.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.