Bug 1496503 - Use MOZ_CrashOOL in MOZ_CrashPrintf. r=froydnj
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 14 Nov 2018 22:35:25 +0000
changeset 446419 2c9ec3b001ffa8936b19fac944e9cf16d6e5e63a
parent 446418 c61a46d741f9649de8cdca1a431c2a51cf05f564
child 446420 35f916cb6452aa55dd906c0c4f63b47e05dfa316
push id35041
push useraiakab@mozilla.com
push dateThu, 15 Nov 2018 09:52:43 +0000
treeherdermozilla-central@48720735b142 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1496503
milestone65.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 1496503 - Use MOZ_CrashOOL in MOZ_CrashPrintf. r=froydnj Because we don't really need all this repetition. Depends on D11718 Depends on D11718 Differential Revision: https://phabricator.services.mozilla.com/D11719
mfbt/Assertions.cpp
--- a/mfbt/Assertions.cpp
+++ b/mfbt/Assertions.cpp
@@ -42,15 +42,15 @@ MOZ_CrashPrintf(const char* aFilename, i
   va_list aArgs;
   va_start(aArgs, aFormat);
   int ret = vsnprintf(sPrintfCrashReason, sPrintfCrashReasonSize,
                       aFormat, aArgs);
   va_end(aArgs);
   MOZ_RELEASE_ASSERT(ret >= 0 && size_t(ret) < sPrintfCrashReasonSize,
     "Could not write the explanation string to the supplied buffer!");
 #ifdef DEBUG
-  MOZ_ReportCrash(sPrintfCrashReason, aFilename, aLine);
+  MOZ_CrashOOL(aFilename, aLine, sPrintfCrashReason);
+#else
+  MOZ_CrashOOL(nullptr, aLine, sPrintfCrashReason);
 #endif
-  gMozCrashReason = sPrintfCrashReason;
-  MOZ_REALLY_CRASH(aLine);
 }
 
 MOZ_END_EXTERN_C