Bug 1402519 - Remove MOZ_CRASHREPORTER directives from security; r?ttaubert
MozReview-Commit-ID: CfPBvffjEhq
--- a/security/sandbox/linux/glue/SandboxCrash.cpp
+++ b/security/sandbox/linux/glue/SandboxCrash.cpp
@@ -13,19 +13,17 @@
#include "SandboxLogging.h"
#include <unistd.h>
#include <sys/syscall.h>
#include "mozilla/Unused.h"
#include "mozilla/dom/Exceptions.h"
#include "nsContentUtils.h"
-#ifdef MOZ_CRASHREPORTER
#include "nsExceptionHandler.h"
-#endif
#include "mozilla/StackWalk.h"
#include "nsString.h"
#include "nsThreadUtils.h"
namespace mozilla {
// Log JS stack info in the same place as the sandbox violation
// message. Useful in case the responsible code is JS and all we have
@@ -101,21 +99,18 @@ SandboxLogCStack()
MozStackWalk(SandboxPrintStackFrame, /* skip */ 3, /* max */ 0, nullptr);
SANDBOX_LOG_ERROR("end of stack.");
}
static void
SandboxCrash(int nr, siginfo_t *info, void *void_context)
{
pid_t pid = getpid(), tid = syscall(__NR_gettid);
- bool dumped = false;
+ bool dumped = CrashReporter::WriteMinidumpForSigInfo(nr, info, void_context);
-#ifdef MOZ_CRASHREPORTER
- dumped = CrashReporter::WriteMinidumpForSigInfo(nr, info, void_context);
-#endif
if (!dumped) {
SANDBOX_LOG_ERROR("crash reporter is disabled (or failed);"
" trying stack trace:");
SandboxLogCStack();
}
// Do this last, in case it crashes or deadlocks.
SandboxLogJSStack();