summaryrefslogtreecommitdiffstats
path: root/ipc/glue/ProcessChild.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /ipc/glue/ProcessChild.cpp
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz
firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip
Adding upstream version 125.0.1.upstream/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);
}