Bug 1402519 - Remove MOZ_CRASHREPORTER directives from security; r=ttaubert
☠☠ backed out by ffc12802d558 ☠ ☠
authorGabriele Svelto <gsvelto@mozilla.com>
Tue, 10 Oct 2017 15:25:39 +0200
changeset 393169 e1964f4389cd6897dafe96be88074b909f555b60
parent 393168 f405337f35698ea0b1ee5106f4593a5fa57a41b6
child 393170 cf298d3815defcd9464272f456b804e9c49b43aa
push id97608
push usergsvelto@mozilla.com
push dateWed, 22 Nov 2017 21:15:43 +0000
treeherdermozilla-inbound@07fcf163241a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersttaubert
bugs1402519
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1402519 - Remove MOZ_CRASHREPORTER directives from security; r=ttaubert MozReview-Commit-ID: CfPBvffjEhq
security/sandbox/linux/glue/SandboxCrash.cpp
--- 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();