gecko-dev/dom/serviceworkers
Andrew Sutherland 3e7307426b Bug 1588152 - Eliminate redundant profile-change-teardown observer. r=asuth
Under parent intercept, we had both an nsIAsyncShutdownClient and a manual
observer notification used by ServiceWorkerManager for shutdown.  (Under
child intercept, the observer notification used a different phase, but we no
longer support child intercept.)  If the observer notification didn't fire
prior to the shutdown blocker, deadlock would result at shutdown.

This patch addresses the problem by changing us to only use the shutdown blocker
for profile-change-teardown, with it taking on the responsibility of calling
the relevant ServiceWorkerManager shutdown logic.

We do leave a finish shutdown observer notification in place.  It's added
dynamically during shutdown (as long as we can get the observer service)
which I believe should allow the observer to run prior to the QuotaManager
profile-before-change-qm receiving its notification due to the reverse
observer notification.  But that isn't required to avoid deadlocking.

As part of these changes, I also removed the configurable logic around shutdown
that existed to support child intercept.  Note that this is not a comprehensive
cleanup, just a normalization of shutdown to require/assume parent intercept.
The most notable aspect of this change is explicitly bailing out of
ServiceWorkerManager initialization if we are not in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D94805
2020-10-30 18:44:54 +00:00
..
test Bug 1673748 - Fix incorrect test r=asuth 2020-10-27 23:32:54 +00:00
FetchEventOpChild.cpp Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi 2020-09-23 15:17:15 +00:00
FetchEventOpChild.h
FetchEventOpParent.cpp Bug 1662925 - Make SW fetch events properly queue. r=dom-workers-and-storage-reviewers,janv 2020-10-07 16:02:24 +00:00
FetchEventOpParent.h Bug 1662925 - Make SW fetch events properly queue. r=dom-workers-and-storage-reviewers,janv 2020-10-07 16:02:24 +00:00
FetchEventOpProxyChild.cpp Bug 1637500 - P2. Rename methods as they are not always dealing with "threads". r=froydnj 2020-06-23 05:05:36 +00:00
FetchEventOpProxyChild.h
FetchEventOpProxyParent.cpp Bug 1662925 - Make SW fetch events properly queue. r=dom-workers-and-storage-reviewers,janv 2020-10-07 16:02:24 +00:00
FetchEventOpProxyParent.h Bug 1662925 - Make SW fetch events properly queue. r=dom-workers-and-storage-reviewers,janv 2020-10-07 16:02:24 +00:00
IPCServiceWorkerDescriptor.ipdlh Bug 1654469 - Stop generating operator==/operator != for IPDL structs/unions by default. r=nika 2020-07-22 17:24:33 +00:00
IPCServiceWorkerRegistrationDescriptor.ipdlh Bug 1654469 - Stop generating operator==/operator != for IPDL structs/unions by default. r=nika 2020-07-22 17:24:33 +00:00
PFetchEventOp.ipdl
PFetchEventOpProxy.ipdl
PServiceWorker.ipdl Bug 1653470 - refcount PServiceWorker r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:50:00 +00:00
PServiceWorkerContainer.ipdl Bug 1653470 - refcount PServiceWorkerContainer r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:51:24 +00:00
PServiceWorkerManager.ipdl
PServiceWorkerRegistration.ipdl Bug 1653470 - refcount PServiceWorkerRegistration r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:52:49 +00:00
PServiceWorkerUpdater.ipdl
RemoteServiceWorkerContainerImpl.cpp Bug 1653470 - refcount PServiceWorkerContainer r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:51:24 +00:00
RemoteServiceWorkerContainerImpl.h Bug 1653470 - refcount PServiceWorkerContainer r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:51:24 +00:00
RemoteServiceWorkerImpl.cpp Bug 1653470 - refcount PServiceWorker r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:50:00 +00:00
RemoteServiceWorkerImpl.h Bug 1653470 - refcount PServiceWorker r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:50:00 +00:00
RemoteServiceWorkerRegistrationImpl.cpp Bug 1653470 - refcount PServiceWorkerRegistration r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:52:49 +00:00
RemoteServiceWorkerRegistrationImpl.h Bug 1653470 - refcount PServiceWorkerRegistration r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:52:49 +00:00
ServiceWorker.cpp Bug 1640606 - Throw while de-serializing instead of serializing if message contains a shared memory object; r=baku,dom-workers-and-storage-reviewers,edenchuang 2020-07-13 08:43:27 +00:00
ServiceWorker.h
ServiceWorkerActors.cpp Bug 1653470 - refcount PServiceWorkerRegistration r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:52:49 +00:00
ServiceWorkerActors.h Bug 1653470 - refcount PServiceWorkerRegistration r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:52:49 +00:00
ServiceWorkerChild.cpp Bug 1653470 - refcount PServiceWorker r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:50:00 +00:00
ServiceWorkerChild.h Bug 1653470 - refcount PServiceWorker r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:50:00 +00:00
ServiceWorkerCloneData.cpp Bug 1640606 - Throw while de-serializing instead of serializing if message contains a shared memory object; r=baku,dom-workers-and-storage-reviewers,edenchuang 2020-07-13 08:43:27 +00:00
ServiceWorkerCloneData.h Bug 1640606 - Throw while de-serializing instead of serializing if message contains a shared memory object; r=baku,dom-workers-and-storage-reviewers,edenchuang 2020-07-13 08:43:27 +00:00
ServiceWorkerContainer.cpp Bug 1609920 - part 2: Guard ServiceWorkerContainer::Register to allow/disallow moz-extension scheme based on prefs. r=dom-workers-and-storage-reviewers,asuth,webidl,smaug 2020-07-03 10:14:42 +00:00
ServiceWorkerContainer.h Bug 1609920 - part 2: Guard ServiceWorkerContainer::Register to allow/disallow moz-extension scheme based on prefs. r=dom-workers-and-storage-reviewers,asuth,webidl,smaug 2020-07-03 10:14:42 +00:00
ServiceWorkerContainerChild.cpp Bug 1653470 - refcount PServiceWorkerContainer r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:51:24 +00:00
ServiceWorkerContainerChild.h Bug 1653470 - refcount PServiceWorkerContainer r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:51:24 +00:00
ServiceWorkerContainerImpl.cpp
ServiceWorkerContainerImpl.h
ServiceWorkerContainerParent.cpp Bug 1637500 - P2. Rename methods as they are not always dealing with "threads". r=froydnj 2020-06-23 05:05:36 +00:00
ServiceWorkerContainerParent.h Bug 1653470 - refcount PServiceWorkerContainer r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:51:24 +00:00
ServiceWorkerContainerProxy.cpp
ServiceWorkerContainerProxy.h Bug 1653470 - refcount PServiceWorkerContainer r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:51:24 +00:00
ServiceWorkerDescriptor.cpp
ServiceWorkerDescriptor.h
ServiceWorkerEvents.cpp Bug 1617822 - Implement FetchEvent.handled r=dom-workers-and-storage-reviewers,asuth 2020-10-29 17:18:28 +00:00
ServiceWorkerEvents.h Bug 1617822 - Implement FetchEvent.handled r=dom-workers-and-storage-reviewers,asuth 2020-10-29 17:18:28 +00:00
ServiceWorkerIPCUtils.h
ServiceWorkerImpl.cpp
ServiceWorkerImpl.h
ServiceWorkerInfo.cpp
ServiceWorkerInfo.h
ServiceWorkerInterceptController.cpp
ServiceWorkerInterceptController.h
ServiceWorkerJob.cpp Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj 2020-08-04 11:27:07 +00:00
ServiceWorkerJob.h
ServiceWorkerJobQueue.cpp
ServiceWorkerJobQueue.h
ServiceWorkerManager.cpp Bug 1588152 - Eliminate redundant profile-change-teardown observer. r=asuth 2020-10-30 18:44:54 +00:00
ServiceWorkerManager.h Bug 1588152 - Eliminate redundant profile-change-teardown observer. r=asuth 2020-10-30 18:44:54 +00:00
ServiceWorkerManagerChild.cpp
ServiceWorkerManagerChild.h
ServiceWorkerManagerParent.cpp Bug 1637500 - P2. Rename methods as they are not always dealing with "threads". r=froydnj 2020-06-23 05:05:36 +00:00
ServiceWorkerManagerParent.h
ServiceWorkerManagerService.cpp
ServiceWorkerManagerService.h
ServiceWorkerOp.cpp Bug 1617822 - Implement FetchEvent.handled r=dom-workers-and-storage-reviewers,asuth 2020-10-29 17:18:28 +00:00
ServiceWorkerOp.h Bug 1617822 - Implement FetchEvent.handled r=dom-workers-and-storage-reviewers,asuth 2020-10-29 17:18:28 +00:00
ServiceWorkerOpArgs.ipdlh Bug 1640606 - Throw while de-serializing instead of serializing if message contains a shared memory object; r=baku,dom-workers-and-storage-reviewers,edenchuang 2020-07-13 08:43:27 +00:00
ServiceWorkerOpPromise.h Bug 1662925 - Make SW fetch events properly queue. r=dom-workers-and-storage-reviewers,janv 2020-10-07 16:02:24 +00:00
ServiceWorkerParent.cpp Bug 1640606 - Throw while de-serializing instead of serializing if message contains a shared memory object; r=baku,dom-workers-and-storage-reviewers,edenchuang 2020-07-13 08:43:27 +00:00
ServiceWorkerParent.h Bug 1653470 - refcount PServiceWorker r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:50:00 +00:00
ServiceWorkerPrivate.cpp Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi 2020-09-23 15:17:15 +00:00
ServiceWorkerPrivate.h Bug 1648010 - Fix uses of NS_LITERAL_STRING with C string literals. r=geckoview-reviewers,agi,froydnj 2020-07-01 08:34:12 +00:00
ServiceWorkerPrivateImpl.cpp Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi 2020-09-23 15:17:15 +00:00
ServiceWorkerPrivateImpl.h
ServiceWorkerProxy.cpp Bug 1653470 - refcount PServiceWorker r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:50:00 +00:00
ServiceWorkerProxy.h Bug 1653470 - refcount PServiceWorker r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:50:00 +00:00
ServiceWorkerRegisterJob.cpp
ServiceWorkerRegisterJob.h
ServiceWorkerRegistrar.cpp Bug 1648010 - Fix uses of NS_LITERAL_STRING with C string literals. r=geckoview-reviewers,agi,froydnj 2020-07-01 08:34:12 +00:00
ServiceWorkerRegistrar.h Bug 1648010 - Fix uses of NS_LITERAL_STRING with C string literals. r=geckoview-reviewers,agi,froydnj 2020-07-01 08:34:12 +00:00
ServiceWorkerRegistrarTypes.ipdlh
ServiceWorkerRegistration.cpp Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj 2020-08-04 11:27:07 +00:00
ServiceWorkerRegistration.h
ServiceWorkerRegistrationChild.cpp Bug 1653470 - refcount PServiceWorkerRegistration r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:52:49 +00:00
ServiceWorkerRegistrationChild.h Bug 1653470 - refcount PServiceWorkerRegistration r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:52:49 +00:00
ServiceWorkerRegistrationDescriptor.cpp
ServiceWorkerRegistrationDescriptor.h
ServiceWorkerRegistrationImpl.cpp
ServiceWorkerRegistrationImpl.h
ServiceWorkerRegistrationInfo.cpp Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj 2020-08-04 11:27:07 +00:00
ServiceWorkerRegistrationInfo.h Bug 1653229 - Remove unnecessary includes for BindingUtils.h. r=jgilbert 2020-07-22 15:12:10 +00:00
ServiceWorkerRegistrationListener.h
ServiceWorkerRegistrationParent.cpp Bug 1637500 - P2. Rename methods as they are not always dealing with "threads". r=froydnj 2020-06-23 05:05:36 +00:00
ServiceWorkerRegistrationParent.h Bug 1653470 - refcount PServiceWorkerRegistration r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:52:49 +00:00
ServiceWorkerRegistrationProxy.cpp Bug 1653470 - refcount PServiceWorkerRegistration r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:52:49 +00:00
ServiceWorkerRegistrationProxy.h Bug 1653470 - refcount PServiceWorkerRegistration r=dom-workers-and-storage-reviewers,asuth 2020-10-23 11:52:49 +00:00
ServiceWorkerScriptCache.cpp Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi 2020-09-23 15:17:15 +00:00
ServiceWorkerScriptCache.h
ServiceWorkerShutdownBlocker.cpp Bug 1588152 - Eliminate redundant profile-change-teardown observer. r=asuth 2020-10-30 18:44:54 +00:00
ServiceWorkerShutdownBlocker.h Bug 1588152 - Eliminate redundant profile-change-teardown observer. r=asuth 2020-10-30 18:44:54 +00:00
ServiceWorkerShutdownState.cpp
ServiceWorkerShutdownState.h
ServiceWorkerUnregisterCallback.cpp
ServiceWorkerUnregisterCallback.h
ServiceWorkerUnregisterJob.cpp Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi 2020-09-23 15:17:15 +00:00
ServiceWorkerUnregisterJob.h
ServiceWorkerUpdateJob.cpp Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi 2020-09-23 15:17:15 +00:00
ServiceWorkerUpdateJob.h
ServiceWorkerUpdaterChild.cpp
ServiceWorkerUpdaterChild.h
ServiceWorkerUpdaterParent.cpp
ServiceWorkerUpdaterParent.h
ServiceWorkerUtils.cpp Bug 1667176 - Miscellaneous unified build fixes. r=mattwoodrow 2020-09-25 08:57:23 +00:00
ServiceWorkerUtils.h
moz.build Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00