Closed Bug 1216566 Opened 6 years ago Closed 6 years ago
Fix a bug in ns
IService Worker Manager .get All Registrations
Currently, nsIServiceWorkerManager.getRegistrations returns an array of nsIServiceWorkerInfos. This doesn't really make sense, because nsIServiceWorkerInfo represents a service worker, not a service worker registration, and these two concepts are not interchangeable. Instead, nsIServiceWorkerManager.getRegistrations should return an array of nsIServiceWorkerRegistrationInfos. This will also eliminate the need to use a ServiceWorkerDataInfo to adapt a ServiceWorkerRegistrationInfo to implement the nsIServiceWorkerInfo interface.
Comment on attachment 8676331 [details] [diff] [review] Fix a bug in nsIServiceWorkerManager.getRegistrations Review of attachment 8676331 [details] [diff] [review]: ----------------------------------------------------------------- I don't think we want to drop about:serviceworkers just yet and removing those properties from nsIServiceWorkerInfo will break it. ::: dom/interfaces/base/nsIServiceWorkerManager.idl @@ -30,5 @@ > - readonly attribute DOMString scriptSpec; > - readonly attribute DOMString currentWorkerURL; > - > - readonly attribute DOMString activeCacheName; > - readonly attribute DOMString waitingCacheName; Removing these properties will break about:serviceworkers. They are still used here: https://dxr.mozilla.org/mozilla-central/source/toolkit/content/aboutServiceWorkers.js#121 ::: toolkit/content/aboutServiceWorkers.js @@ +61,3 @@ > continue; > } > +/ Please remove this line.
Attachment #8676331 - Flags: review?(catalin.badea392) → review-
New patch with comments addressed.
Summary: Fix a bug in nsIServiceWorkerManager.getRegistrations → Fix a bug in nsIServiceWorkerManager.getAllRegistrations
Attachment #8678829 - Flags: review?(catalin.badea392) → review+
Try push for this patch: https://treeherder.mozilla.org/#/jobs?repo=try&revision=f30814b3f86b
removing the b2g 2.5 flag since this commit has been reverted due to an incorrect merge, sorry for the confusion
You need to log in before you can comment on or make changes to this bug.