Closed Bug 1471631 Opened 2 years ago Closed 2 years ago

simplify ServiceWorker registration listener code

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: bkelly, Assigned: bkelly)

References

Details

Attachments

(1 file, 2 obsolete files)

Currently you have to register a listener on the ServiceWorkerManager to receives updates about a particular registration.  This could be a lot more simple if we just added these listeners to the ServiceWorkerRegistrationInfo itself.

This is part of my IPC binding layer patch queue.
Comment on attachment 8988277 [details] [diff] [review]
Move ServiceWorkerManager::AddRegistrationEventListener() code to ServiceWorkerRegistrationInfo. r=mrbkap

This is a refactoring patch I had in my IPC patch queue.  It simplifies some of the relationship inside SWM.  Previously we stored the list of registration listeners in SWM itself and ServiceWorkerRegistrationInfo had to call out to it to update listeners.  This patch simplifies things by making listeners attach to ServiceWorkerRegistrationInfo itself.
Attachment #8988277 - Flags: review?(mrbkap)
Depends on: 1462772
Attachment #8988277 - Flags: review?(mrbkap) → review+
Priority: -- → P2
Pushed by bkelly@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/90f2a322ea82
Move ServiceWorkerManager::AddRegistrationEventListener() code to ServiceWorkerRegistrationInfo. r=mrbkap
https://hg.mozilla.org/mozilla-central/rev/90f2a322ea82
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.