Bug 1338574 - Part 3: Use MOZ_CRASH_UNSAFE_PRINTF in IPC glue. r=mrbkap, a=NPOTB
authorEmanuel Hoogeveen <emanuel.hoogeveen@gmail.com>
Tue, 21 Feb 2017 18:01:48 +0100
changeset 578475 2d4da5a366e8e24e8db8133ac14890d66e3aa3cb
parent 578474 50e120d7ac64a36aff6c4392b1e972bad2b0f95f
child 578476 b10d9b0c187f525bda8bb521998302f1830ae2c6
push id58939
push userbmo:cku@mozilla.com
push dateTue, 16 May 2017 04:17:59 +0000
reviewersmrbkap, NPOTB
bugs1338574
milestone52.1.2
Bug 1338574 - Part 3: Use MOZ_CRASH_UNSAFE_PRINTF in IPC glue. r=mrbkap, a=NPOTB
ipc/glue/BackgroundChildImpl.cpp
--- a/ipc/glue/BackgroundChildImpl.cpp
+++ b/ipc/glue/BackgroundChildImpl.cpp
@@ -133,19 +133,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!
 }