Commit 89ace3af authored by Jens Stutte's avatar Jens Stutte
Browse files

Bug 1741131: Be explicit about the process type in the XPCOMSpinEventLoopStack...

Bug 1741131: Be explicit about the process type in the XPCOMSpinEventLoopStack annotation. r=xpcom-reviewers,nika

We suspect to see the parent processes annotation on crash reports from child processes that result from IPC shutdown kills. In order to reduce the confusion we add a prefix for the process type.

Differential Revision: https://phabricator.services.mozilla.com/D131719
parent 99c27e9b
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -664,8 +664,15 @@ StaticMutex AutoNestedEventLoopAnnotation::sStackMutex;
// static from SpinEventLoopUntil.h
void AutoNestedEventLoopAnnotation::AnnotateXPCOMSpinEventLoopStack(
    const nsACString& aStack) {
  if (aStack.Length() > 0) {
    nsCString prefixedStack(XRE_GetProcessTypeString());
    prefixedStack += ": "_ns + aStack;
    CrashReporter::AnnotateCrashReport(
      CrashReporter::Annotation::XPCOMSpinEventLoopStack, aStack);
        CrashReporter::Annotation::XPCOMSpinEventLoopStack, prefixedStack);
  } else {
    CrashReporter::AnnotateCrashReport(
        CrashReporter::Annotation::XPCOMSpinEventLoopStack, ""_ns);
  }
}

nsresult nsThreadManager::SpinEventLoopUntilInternal(