diff --git a/dom/plugins/PluginModuleChild.cpp b/dom/plugins/PluginModuleChild.cpp index 2532d03a3af3..b345cbb7ff8d 100644 --- a/dom/plugins/PluginModuleChild.cpp +++ b/dom/plugins/PluginModuleChild.cpp @@ -579,9 +579,21 @@ PluginModuleChild::AnswerNP_Shutdown(NPError *rv) return true; } +void +PluginModuleChild::QuickExit() +{ + NS_WARNING("plugin process _exit()ing"); + _exit(0); +} + void PluginModuleChild::ActorDestroy(ActorDestroyReason why) { + if (AbnormalShutdown == why) { + NS_WARNING("shutting down early because of crash!"); + QuickExit(); + } + // doesn't matter why we're being destroyed; it's up to us to // initiate (clean) shutdown XRE_ShutdownChildProcess(); diff --git a/dom/plugins/PluginModuleChild.h b/dom/plugins/PluginModuleChild.h index 7cb2a587c056..0d18c768229e 100644 --- a/dom/plugins/PluginModuleChild.h +++ b/dom/plugins/PluginModuleChild.h @@ -140,6 +140,8 @@ protected: virtual void ActorDestroy(ActorDestroyReason why); + NS_NORETURN void QuickExit(); + public: PluginModuleChild(); virtual ~PluginModuleChild();