Bug 1324093 - Part 2: Don't AnnotateMozCrashReason on debug builds. r=bsmedberg
authorDavid Major <dmajor@mozilla.com>
Wed, 18 Jan 2017 09:34:02 +1300
changeset 329724 58b1e40375e6f48f23f5d6422f9c6e0e15bb3eb7
parent 329723 9939303eecf11c1cdba510c7f3f180fb1d4faafd
child 329725 f82548e0df704c91cf06caee7974153a062e4043
push id31222
push userryanvm@gmail.com
push dateWed, 18 Jan 2017 14:24:23 +0000
treeherdermozilla-central@5b544b8ab06b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs1324093
milestone53.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 1324093 - Part 2: Don't AnnotateMozCrashReason on debug builds. r=bsmedberg I left gMozCrashReason visible (but not meaningfully used) in all builds, in order to match the behavior of Assertions.cpp, and to avoid more #ifdef clutter in nsExceptionHandler.cpp. MozReview-Commit-ID: smoFkddGzd
mfbt/Assertions.h
--- a/mfbt/Assertions.h
+++ b/mfbt/Assertions.h
@@ -18,27 +18,27 @@
 #include "mozilla/Likely.h"
 #include "mozilla/MacroArgs.h"
 #include "mozilla/StaticAnalysisFunctions.h"
 #include "mozilla/Types.h"
 #ifdef MOZ_DUMP_ASSERTION_STACK
 #include "nsTraceRefcnt.h"
 #endif
 
-#if defined(MOZ_HAS_MOZGLUE) || defined(MOZILLA_INTERNAL_API)
 /*
  * The crash reason set by MOZ_CRASH_ANNOTATE is consumed by the crash reporter
  * if present. It is declared here (and defined in Assertions.cpp) to make it
  * available to all code, even libraries that don't link with the crash reporter
  * directly.
  */
 MOZ_BEGIN_EXTERN_C
 extern MFBT_DATA const char* gMozCrashReason;
 MOZ_END_EXTERN_C
 
+#if !defined(DEBUG) && (defined(MOZ_HAS_MOZGLUE) || defined(MOZILLA_INTERNAL_API))
 static inline void
 AnnotateMozCrashReason(const char* reason)
 {
   gMozCrashReason = reason;
 }
 #  define MOZ_CRASH_ANNOTATE(...) AnnotateMozCrashReason(__VA_ARGS__)
 #else
 #  define MOZ_CRASH_ANNOTATE(...) do { /* nothing */ } while (0)