From 803ef4ef5b14ff135b826425825291259f9ceeab Mon Sep 17 00:00:00 2001 From: "evan@chromium.org" Date: Wed, 29 Jul 2009 00:15:24 +0000 Subject: linux: unload plugin libraries after extracting mime types I had not unloaded them as a premature optimization, thinking it'd be better to leave 'em around since they'll eventually be loaded by a page. But that happens in the plugin process and reading the mime type happens in the browser process, so it didn't help anyway. BUG=17444 Review URL: http://codereview.chromium.org/160303 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21929 0039d316-1c4b-4281-b951-d872f2087c98 --- base/native_library_linux.cc | 6 ++++-- webkit/glue/plugins/plugin_lib_linux.cc | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/base/native_library_linux.cc b/base/native_library_linux.cc index 9967e475..05050bd 100644 --- a/base/native_library_linux.cc +++ b/base/native_library_linux.cc @@ -26,8 +26,10 @@ NativeLibrary LoadNativeLibrary(const FilePath& library_path) { // static void UnloadNativeLibrary(NativeLibrary library) { int ret = dlclose(library); - if (ret < 0) - NOTREACHED() << "dlclose failed: " << dlerror(); + if (ret < 0) { + LOG(ERROR) << "dlclose failed: " << dlerror(); + NOTREACHED(); + } } // static diff --git a/webkit/glue/plugins/plugin_lib_linux.cc b/webkit/glue/plugins/plugin_lib_linux.cc index e27c999..ec0ead9 100644 --- a/webkit/glue/plugins/plugin_lib_linux.cc +++ b/webkit/glue/plugins/plugin_lib_linux.cc @@ -81,6 +81,8 @@ bool PluginLib::ReadWebPluginInfo(const FilePath& filename, info->desc = UTF8ToWide(description); } + base::UnloadNativeLibrary(dl); + return true; } -- cgit v1.1