diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-29 00:15:24 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-29 00:15:24 +0000 |
commit | 803ef4ef5b14ff135b826425825291259f9ceeab (patch) | |
tree | 2091f213bb1a2ab21a416995cb15668314564f0b | |
parent | 9fc081e3fdd83b0ab00159f0fb61eb59bdf577cd (diff) | |
download | chromium_src-803ef4ef5b14ff135b826425825291259f9ceeab.zip chromium_src-803ef4ef5b14ff135b826425825291259f9ceeab.tar.gz chromium_src-803ef4ef5b14ff135b826425825291259f9ceeab.tar.bz2 |
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
-rw-r--r-- | base/native_library_linux.cc | 6 | ||||
-rw-r--r-- | 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; } |