Bug 902790 - Prevent browser crash if child process fails to start. r=jlebar, a=gavin
authorMark Hammond <mhammond@skippinet.com.au>
Fri, 09 Aug 2013 16:23:24 +1000
changeset 153710 87d11537f679b5482fc64337cff5c6a377b35bc1
parent 153709 d3e60eab3da57de72cb3d4d89cc8cfb738ff77f6
child 153711 f8dceda8a125976d4b2d379d67a01346a96dfb3b
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlebar, gavin
bugs902790
milestone25.0a2
Bug 902790 - Prevent browser crash if child process fails to start. r=jlebar, a=gavin
ipc/glue/GeckoChildProcessHost.cpp
--- a/ipc/glue/GeckoChildProcessHost.cpp
+++ b/ipc/glue/GeckoChildProcessHost.cpp
@@ -463,17 +463,17 @@ bool
 GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector<std::string>& aExtraOpts, base::ProcessArchitecture arch)
 {
   // We rely on the fact that InitializeChannel() has already been processed
   // on the IO thread before this point is reached.
   if (!GetChannel()) {
     return false;
   }
 
-  base::ProcessHandle process;
+  base::ProcessHandle process = 0;
 
   // send the child the PID so that it can open a ProcessHandle back to us.
   // probably don't want to do this in the long run
   char pidstring[32];
   PR_snprintf(pidstring, sizeof(pidstring) - 1,
 	      "%ld", base::Process::Current().pid());
 
   const char* const childProcessType =