summaryrefslogtreecommitdiffstats
path: root/ipc/glue/ProcessChild.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /ipc/glue/ProcessChild.cpp
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ipc/glue/ProcessChild.cpp')
-rw-r--r--ipc/glue/ProcessChild.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/ipc/glue/ProcessChild.cpp b/ipc/glue/ProcessChild.cpp
index 724d2b09bf..fe727ffa66 100644
--- a/ipc/glue/ProcessChild.cpp
+++ b/ipc/glue/ProcessChild.cpp
@@ -21,7 +21,6 @@
#include "nsAppRunner.h"
#include "mozilla/AppShutdown.h"
-#include "mozilla/ipc/CrashReporterClient.h"
#include "mozilla/ipc/IOThreadChild.h"
#include "mozilla/GeckoArgs.h"
@@ -29,6 +28,8 @@ namespace mozilla {
namespace ipc {
ProcessChild* ProcessChild::gProcessChild;
+StaticMutex ProcessChild::gIPCShutdownStateLock;
+nsCString ProcessChild::gIPCShutdownStateAnnotation;
static Atomic<bool> sExpectingShutdown(false);
@@ -39,6 +40,9 @@ ProcessChild::ProcessChild(ProcessId aParentPid, const nsID& aMessageChannelId)
mMessageChannelId(aMessageChannelId) {
MOZ_ASSERT(mUILoop, "UILoop should be created by now");
MOZ_ASSERT(!gProcessChild, "should only be one ProcessChild");
+ CrashReporter::RegisterAnnotationNSCString(
+ CrashReporter::Annotation::IPCShutdownState,
+ &gIPCShutdownStateAnnotation);
gProcessChild = this;
}
@@ -101,14 +105,14 @@ ProcessChild::~ProcessChild() {
// we'll get into late IPC shutdown with processes still running.
SleepIfEnv("MOZ_TEST_CHILD_EXIT_HANG");
#endif
+ gIPCShutdownStateAnnotation = ""_ns;
gProcessChild = nullptr;
}
/* static */
void ProcessChild::NotifiedImpendingShutdown() {
sExpectingShutdown = true;
- CrashReporter::AppendToCrashReportAnnotation(
- CrashReporter::Annotation::IPCShutdownState,
+ ProcessChild::AppendToIPCShutdownStateAnnotation(
"NotifiedImpendingShutdown"_ns);
}