Bug 1338574 - Part 3: Use MOZ_CRASH_UNSAFE_PRINTF in IPC glue. r=mrbkap
authorEmanuel Hoogeveen <emanuel.hoogeveen@gmail.com>
Tue, 21 Feb 2017 18:01:48 +0100
changeset 344162 02ca86a397be7609ecf96bda5b162f6598906884
parent 344161 253f65ad681fdc0ebc8894b4ba6512598adeabbb
child 344163 2a7baab53d6920e2ed024aa80e3c04344885d971
push id31402
push usercbook@mozilla.com
push dateWed, 22 Feb 2017 13:33:50 +0000
treeherdermozilla-central@f5372cb6c3c7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs1338574
milestone54.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 1338574 - Part 3: Use MOZ_CRASH_UNSAFE_PRINTF in IPC glue. r=mrbkap
ipc/glue/BackgroundChildImpl.cpp
--- a/ipc/glue/BackgroundChildImpl.cpp
+++ b/ipc/glue/BackgroundChildImpl.cpp
@@ -131,19 +131,17 @@ BackgroundChildImpl::ProcessingError(Res
     HANDLE_CASE(MsgValueError);
 
 #undef HANDLE_CASE
 
     default:
       MOZ_CRASH("Unknown error code!");
   }
 
-  // This is just MOZ_CRASH() un-inlined so that we can pass the result code as
-  // a string. MOZ_CRASH() only supports string literals at the moment.
-  MOZ_ReportCrash(abortMessage.get(), __FILE__, __LINE__); MOZ_REALLY_CRASH();
+  MOZ_CRASH_UNSAFE_PRINTF("%s: %s", abortMessage.get(), aReason);
 }
 
 void
 BackgroundChildImpl::ActorDestroy(ActorDestroyReason aWhy)
 {
   // May happen on any thread!
 }