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 a=akeybl
authorBenjamin Smedberg <benjamin@smedbergs.us>
Thu, 04 Oct 2012 12:58:42 -0400
changeset 109542 c72cdc4f3d95b43eade159d21a49cb99551ceba8
parent 109541 6feb23ee423c600123be3f28fed7516612e57bee
child 109543 2d1dc4ef632f5330ff6defe28e5d8bfdd2e534bb
push id1524
push userbsmedberg@mozilla.com
push dateMon, 15 Oct 2012 17:09:02 +0000
treeherdermozilla-beta@c72cdc4f3d95 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgfritzsche, akeybl
bugs792372
milestone17.0
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 a=akeybl
dom/plugins/ipc/PluginModuleParent.cpp
--- a/dom/plugins/ipc/PluginModuleParent.cpp
+++ b/dom/plugins/ipc/PluginModuleParent.cpp
@@ -1425,13 +1425,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