Bug 1103036 - Don't send shutdown message to Nuwa processes; r=billm
authorJim Chen <nchen@mozilla.com>
Sat, 10 Jan 2015 13:46:46 -0500
changeset 223197 a55f093defe1023db222cbd5be3a65f1bb963e39
parent 223196 19017193859ab2cedee889654d106745f5f8f4a8
child 223198 c213d9d53886ebc66b681fb5767cf4a267ad3056
push id10769
push usercbook@mozilla.com
push dateMon, 12 Jan 2015 14:15:52 +0000
treeherderfx-team@0e9765732906 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1103036
milestone37.0a1
Bug 1103036 - Don't send shutdown message to Nuwa processes; r=billm
dom/ipc/ContentParent.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -1495,16 +1495,24 @@ ContentParent::TransformPreallocatedInto
     mOpener = aOpener;
     mAppManifestURL.Truncate();
     mIsForBrowser = true;
 }
 
 void
 ContentParent::ShutDownProcess(ShutDownMethod aMethod)
 {
+#ifdef MOZ_NUWA_PROCESS
+    if (aMethod == SEND_SHUTDOWN_MESSAGE && IsNuwaProcess()) {
+        // We shouldn't send shutdown messages to frozen Nuwa processes,
+        // so just close the channel.
+        aMethod = CLOSE_CHANNEL;
+    }
+#endif
+
     // Shutting down by sending a shutdown message works differently than the
     // other methods. We first call Shutdown() in the child. After the child is
     // ready, it calls FinishShutdown() on us. Then we close the channel.
     if (aMethod == SEND_SHUTDOWN_MESSAGE) {
         if (mIPCOpen && !mShutdownPending && SendShutdown()) {
             mShutdownPending = true;
             // Start the force-kill timer if we haven't already.
             StartForceKillTimer();