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 373189 02ca86a397be7609ecf96bda5b162f6598906884
parent 373188 253f65ad681fdc0ebc8894b4ba6512598adeabbb
child 373190 2a7baab53d6920e2ed024aa80e3c04344885d971
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs1338574
milestone54.0a1
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!
 }