Bug 1402519 - Remove MOZ_CRASHREPORTER directives from security; r=ttaubert
authorGabriele Svelto <gsvelto@mozilla.com>
Tue, 10 Oct 2017 15:25:39 +0200
changeset 393414 1114ed8bfacdd43d55da3af0bf1f2b6668bf8894
parent 393413 cf70ea17f0d114e16f362f4e4271c89aeb7ce786
child 393415 c345fb484409af037f0fdc425c8bbb4ae1ff7592
push id97659
push usergsvelto@mozilla.com
push dateThu, 23 Nov 2017 21:46:45 +0000
treeherdermozilla-inbound@5bd068605282 [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();