Defer the PluginCrashed notification so that we don't delete the PluginModuleParent while we're in the middle of a crash notification.

This commit is contained in:
Benjamin Smedberg 2009-12-04 21:20:06 -05:00
parent 35ac1f8cd2
commit 6b8e2464c1

View File

@ -99,8 +99,12 @@ PluginModuleParent::ActorDestroy(ActorDestroyReason why)
switch (why) {
case AbnormalShutdown:
mShutdown = true;
if (mPlugin)
mPlugin->PluginCrashed();
if (mPlugin) {
nsCOMPtr<nsIRunnable> r =
new nsRunnableMethod<nsNPAPIPlugin>(
mPlugin, &nsNPAPIPlugin::PluginCrashed);
NS_DispatchToMainThread(r);
}
break;
case NormalShutdown: