Bug 1103036 - Don't send shutdown message to Nuwa processes; r=billm
--- 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();