Bug 948485 - Fix b2g process crash when the Nuwa process exits. r=khuey, a=1.3+
authorCervantes Yu <cyu@mozilla.com>
Wed, 11 Dec 2013 17:48:28 +0800
changeset 175221 77879e81768c4adef8a365fc64d09b621118c168
parent 175220 db8b2ff2ef9bec462351bd8fd95db18665b91d01
child 175222 031270be3702761bc06481f8d94f41c51e02d67a
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey, 1
bugs948485
milestone28.0a2
Bug 948485 - Fix b2g process crash when the Nuwa process exits. r=khuey, a=1.3+
dom/ipc/ContentParent.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -894,20 +894,21 @@ ContentParent::MarkAsDead()
 
     mIsAlive = false;
 }
 
 void
 ContentParent::OnChannelError()
 {
     nsRefPtr<ContentParent> content(this);
-    PContentParent::OnChannelError();
 #ifdef MOZ_NUWA_PROCESS
+    // Handle app or Nuwa process exit before normal channel error handling.
     PreallocatedProcessManager::MaybeForgetSpare(this);
 #endif
+    PContentParent::OnChannelError();
 }
 
 void
 ContentParent::OnChannelConnected(int32_t pid)
 {
     ProcessHandle handle;
     if (!base::OpenPrivilegedProcessHandle(pid, &handle)) {
         NS_WARNING("Can't open handle to child process.");