Bug 792372 - Use a check to solve a race notifying the browser process about a Flash crash while the channel is being closed [@ mozilla::ipc::AsyncChannel::CloseWithError()], r=gfritzsche
authorBenjamin Smedberg <benjamin@smedbergs.us>
Thu, 04 Oct 2012 12:58:42 -0400
changeset 109352 970b0467c3ef756de47bfab0ae1d19f353127de7
parent 109351 b237556c855d78214a98548776fd2dad200a1e4b
child 109353 58f3ccaa02b89bf3436a5af454cd214c1f3707ba
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersgfritzsche
bugs792372
milestone18.0a1
Bug 792372 - Use a check to solve a race notifying the browser process about a Flash crash while the channel is being closed [@ mozilla::ipc::AsyncChannel::CloseWithError()], r=gfritzsche
dom/plugins/ipc/PluginModuleParent.cpp
--- a/dom/plugins/ipc/PluginModuleParent.cpp
+++ b/dom/plugins/ipc/PluginModuleParent.cpp
@@ -1450,13 +1450,15 @@ PluginModuleParent::InitializeInjector()
             InjectCrashReporterIntoProcess(mFlashProcess2, this);
         }
     }
 }
 
 void
 PluginModuleParent::OnCrash(DWORD processID)
 {
-    GetIPCChannel()->CloseWithError();
-    KillProcess(OtherProcess(), 1, false);
+    if (!mShutdown) {
+        GetIPCChannel()->CloseWithError();
+        KillProcess(OtherProcess(), 1, false);
+    }
 }
 
 #endif // MOZ_CRASHREPORTER_INJECTOR