Bug 747683 - Don't unload the plugin library right before exiting the plugin process, because some plugins are using atexit handlers, r=josh
authorBenjamin Smedberg <benjamin@smedbergs.us>
Wed, 13 Jun 2012 15:03:03 -0700
changeset 96605 8cf5423b0213
parent 96604 880f30ecdf6b
child 96606 b30e903d23a0
push id22922
push userbsmedberg@mozilla.com
push date2012-06-13 22:20 +0000
Treeherderresults
reviewersjosh
bugs747683
milestone16.0a1
Bug 747683 - Don't unload the plugin library right before exiting the plugin process, because some plugins are using atexit handlers, r=josh
dom/plugins/ipc/PluginModuleChild.cpp
--- a/dom/plugins/ipc/PluginModuleChild.cpp
+++ b/dom/plugins/ipc/PluginModuleChild.cpp
@@ -108,19 +108,19 @@ PluginModuleChild::PluginModuleChild()
 #ifdef XP_MACOSX
     mac_plugin_interposing::child::SetUpCocoaInterposing();
 #endif
 }
 
 PluginModuleChild::~PluginModuleChild()
 {
     NS_ASSERTION(gInstance == this, "Something terribly wrong here!");
-    if (mLibrary) {
-        PR_UnloadLibrary(mLibrary);
-    }
+
+    // We don't unload the plugin library in case it uses atexit handlers or
+    // other similar hooks.
 
     DeinitGraphics();
 
     gInstance = nsnull;
 }
 
 // static
 PluginModuleChild*