Bug 1324093 - Part 2: Don't AnnotateMozCrashReason on debug builds. r=bsmedberg
☠☠ backed out by b5ecc8950d72 ☠ ☠
authorDavid Major <dmajor@mozilla.com>
Fri, 13 Jan 2017 13:58:22 +1300
changeset 329238 0ee273b613dbec2dee5df5ac4de8cd88c7056c87
parent 329237 d3cc90db1908a37934800e45e3b83a1883ca138b
child 329239 b843a34fdc23d8b7bb630f16903742444c194525
push id31201
push usercbook@mozilla.com
push dateFri, 13 Jan 2017 09:20:42 +0000
treeherdermozilla-central@91f5293e9a89 [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: JOWNTMMYcDa
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)