fune/toolkit/crashreporter
Jens Stutte 87de42e070 Bug 1726813: Ensure AppShutdown remains in sync with shutdown notifications in the parent process. r=xpcom-reviewers,nika,dom-worker-reviewers,asuth
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
2021-09-15 07:25:29 +00:00
..
breakpad-client Bug 1724928 - Catch EXC_CRASH exceptions on macOS r=KrisWright 2021-08-31 09:18:50 +00:00
breakpad-patches Bug 1724388 - Add support for catching and processing EXC_GUARD exceptions on macOS r=KrisWright 2021-08-20 08:06:00 +00:00
breakpad-windows-libxul
breakpad-windows-standalone
client Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium 2021-08-25 10:46:17 +00:00
content
docs
google-breakpad Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium 2021-08-25 10:46:17 +00:00
injector
minidump-analyzer Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium 2021-08-25 10:46:17 +00:00
mozwer
mozwer-rust Bug 1726628 - Switch cargo resolver to 2 r=glandium 2021-09-01 21:11:33 +00:00
rust_minidump_writer_linux
test Bug 1726813: Ensure AppShutdown remains in sync with shutdown notifications in the parent process. r=xpcom-reviewers,nika,dom-worker-reviewers,asuth 2021-09-15 07:25:29 +00:00
tools Bug 1714684: Remove usages of vendored "mock" library r=perftest-reviewers,ahal,sparky 2021-06-14 15:34:46 +00:00
CrashAnnotations.cpp
CrashAnnotations.h.in
CrashAnnotations.yaml Backed out changeset 65f8b0434e1e (bug 1708580) for causing Btime failures. CLOSED TREE 2021-08-14 00:44:48 +03:00
crashreporter.mozbuild
CrashReports.jsm
CrashSubmit.jsm
generate_crash_reporter_sources.py
InjectCrashReporter.cpp
InjectCrashReporter.h
jar.mn
LoadLibraryRemote.cpp
LoadLibraryRemote.h
mac_utils.h
mac_utils.mm
moz.build Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium 2021-08-25 10:46:17 +00:00
nsDummyExceptionHandler.cpp Bug 1697895 - Register the WER runtime exception module in child processes r=KrisWright 2021-06-11 09:59:49 +00:00
nsExceptionHandler.cpp Bug 1723934 - Remove old and useless crash annotations r=KrisWright 2021-08-09 20:08:17 +00:00
nsExceptionHandler.h Bug 1711418 - Record the OOM allocation size in WER crashes r=KrisWright 2021-06-11 09:59:51 +00:00
nsExceptionHandlerUtils.cpp
nsExceptionHandlerUtils.h
ThreadAnnotation.cpp
ThreadAnnotation.h
update-breakpad.sh