зеркало из https://github.com/mozilla/gecko-dev.git
87de42e070
The goal here is to ensure we can always rely on `AppShutdown::GetShutdownPhase` to be in sync with the "real" application status, mainly this was needed for xpcshell tests to not break if we add assertions on our shutdown state on some global singletons. We keep the existing observer notification topics but force them (on the parent process) to be issued through the new `advanceShutdownPhase` function of the startup service using the `ShutdownPhase` enum. This way we can synchronize `AppShutdown`'s internal status accordingly. Some further notes: # The `MOZ_ASSERT(AppShutdown::IsNoOrLegalShutdownTopic(aTopic));` in `NotifyObservers` helped a lot to identify missing cases. I think we should keep it in order to stay safe. # Introducing the `cenum IDLShutdownPhase` helps to keep the knowledge about the mapping from shutdown phases to observer topics exclusively inside AppShutdown.cpp. Still callers must know what they do in order to choose a proper phase, of course. # However we must be aware that `AppShutdown` this way can be kept in sync with the shutdown notifications only in the parent process and that `GetCurrentShutdownPhase` might not give the correct result in child processes. We might want to file a follow up bug that adds some asserts to avoid improper use of `AppShutdown` functions in child processes (but I do not want to make this patch bigger as needed to solve the blocking dependency for bug 1697972). # The socket process is one example of a child process that "overloads" shutdown topics. I was wondering if it is the right call to use the very same topic names here to request shutdown to the socket process or if it should have its own topics. Those topics triggered the assert and thus I had to disable it for child processes, for now. # This goes together with the more general approach to define process type specific shutdown phases (and hence mappings to topics) as drafted very roughly in bug 1697745. # This patch seemed to trigger a known intermittent more often, thus the change here in `ServiceWorkerManager`. Differential Revision: https://phabricator.services.mozilla.com/D124350 |
||
---|---|---|
.. | ||
docs | ||
test | ||
FetchEventOpChild.cpp | ||
FetchEventOpChild.h | ||
FetchEventOpParent.cpp | ||
FetchEventOpParent.h | ||
FetchEventOpProxyChild.cpp | ||
FetchEventOpProxyChild.h | ||
FetchEventOpProxyParent.cpp | ||
FetchEventOpProxyParent.h | ||
IPCNavigationPreloadState.ipdlh | ||
IPCServiceWorkerDescriptor.ipdlh | ||
IPCServiceWorkerRegistrationDescriptor.ipdlh | ||
NavigationPreloadManager.cpp | ||
NavigationPreloadManager.h | ||
PFetchEventOp.ipdl | ||
PFetchEventOpProxy.ipdl | ||
PServiceWorker.ipdl | ||
PServiceWorkerContainer.ipdl | ||
PServiceWorkerManager.ipdl | ||
PServiceWorkerRegistration.ipdl | ||
RemoteServiceWorkerContainerImpl.cpp | ||
RemoteServiceWorkerContainerImpl.h | ||
RemoteServiceWorkerImpl.cpp | ||
RemoteServiceWorkerImpl.h | ||
RemoteServiceWorkerRegistrationImpl.cpp | ||
RemoteServiceWorkerRegistrationImpl.h | ||
ServiceWorker.cpp | ||
ServiceWorker.h | ||
ServiceWorkerActors.cpp | ||
ServiceWorkerActors.h | ||
ServiceWorkerChild.cpp | ||
ServiceWorkerChild.h | ||
ServiceWorkerCloneData.cpp | ||
ServiceWorkerCloneData.h | ||
ServiceWorkerContainer.cpp | ||
ServiceWorkerContainer.h | ||
ServiceWorkerContainerChild.cpp | ||
ServiceWorkerContainerChild.h | ||
ServiceWorkerContainerParent.cpp | ||
ServiceWorkerContainerParent.h | ||
ServiceWorkerContainerProxy.cpp | ||
ServiceWorkerContainerProxy.h | ||
ServiceWorkerDescriptor.cpp | ||
ServiceWorkerDescriptor.h | ||
ServiceWorkerEvents.cpp | ||
ServiceWorkerEvents.h | ||
ServiceWorkerIPCUtils.h | ||
ServiceWorkerInfo.cpp | ||
ServiceWorkerInfo.h | ||
ServiceWorkerInterceptController.cpp | ||
ServiceWorkerInterceptController.h | ||
ServiceWorkerJob.cpp | ||
ServiceWorkerJob.h | ||
ServiceWorkerJobQueue.cpp | ||
ServiceWorkerJobQueue.h | ||
ServiceWorkerManager.cpp | ||
ServiceWorkerManager.h | ||
ServiceWorkerManagerChild.h | ||
ServiceWorkerManagerParent.cpp | ||
ServiceWorkerManagerParent.h | ||
ServiceWorkerOp.cpp | ||
ServiceWorkerOp.h | ||
ServiceWorkerOpArgs.ipdlh | ||
ServiceWorkerOpPromise.h | ||
ServiceWorkerParent.cpp | ||
ServiceWorkerParent.h | ||
ServiceWorkerPrivate.cpp | ||
ServiceWorkerPrivate.h | ||
ServiceWorkerPrivateImpl.cpp | ||
ServiceWorkerPrivateImpl.h | ||
ServiceWorkerProxy.cpp | ||
ServiceWorkerProxy.h | ||
ServiceWorkerQuotaUtils.cpp | ||
ServiceWorkerQuotaUtils.h | ||
ServiceWorkerRegisterJob.cpp | ||
ServiceWorkerRegisterJob.h | ||
ServiceWorkerRegistrar.cpp | ||
ServiceWorkerRegistrar.h | ||
ServiceWorkerRegistrarTypes.ipdlh | ||
ServiceWorkerRegistration.cpp | ||
ServiceWorkerRegistration.h | ||
ServiceWorkerRegistrationChild.cpp | ||
ServiceWorkerRegistrationChild.h | ||
ServiceWorkerRegistrationDescriptor.cpp | ||
ServiceWorkerRegistrationDescriptor.h | ||
ServiceWorkerRegistrationInfo.cpp | ||
ServiceWorkerRegistrationInfo.h | ||
ServiceWorkerRegistrationListener.h | ||
ServiceWorkerRegistrationParent.cpp | ||
ServiceWorkerRegistrationParent.h | ||
ServiceWorkerRegistrationProxy.cpp | ||
ServiceWorkerRegistrationProxy.h | ||
ServiceWorkerScriptCache.cpp | ||
ServiceWorkerScriptCache.h | ||
ServiceWorkerShutdownBlocker.cpp | ||
ServiceWorkerShutdownBlocker.h | ||
ServiceWorkerShutdownState.cpp | ||
ServiceWorkerShutdownState.h | ||
ServiceWorkerUnregisterCallback.cpp | ||
ServiceWorkerUnregisterCallback.h | ||
ServiceWorkerUnregisterJob.cpp | ||
ServiceWorkerUnregisterJob.h | ||
ServiceWorkerUpdateJob.cpp | ||
ServiceWorkerUpdateJob.h | ||
ServiceWorkerUtils.cpp | ||
ServiceWorkerUtils.h | ||
moz.build |