summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content/ppapi_plugin/ppapi_thread.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index 6aa7b80..f2245f4 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -117,6 +117,16 @@ PpapiThread::~PpapiThread() {
plugin_entry_points_.shutdown_module();
WebKit::shutdown();
+#if defined(OS_MACOSX)
+ // TODO(shess): <http://crbug.com/172319> is about how modules
+ // cannot be unloaded when Objective-C is involved. interaction
+ // between the Objective-C runtime and module unloading. Leaking
+ // the module here to work around this, a later CL should autodetect
+ // the problem and leak in NativeLibrary.
+ if (is_broker_)
+ library_.Release();
+#endif
+
#if defined(OS_WIN)
if (permissions_.HasPermission(ppapi::PERMISSION_FLASH))
base::win::SetShouldCrashOnProcessDetach(false);