diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-27 23:06:34 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-27 23:06:34 +0000 |
commit | 0922baeab1134628d5898a21dbbd8973647caae0 (patch) | |
tree | a475c682310d81269502c5c28c96093952691091 /base | |
parent | da4b5a8ccf7640d092a7d7cf87c2867415f4324f (diff) | |
download | chromium_src-0922baeab1134628d5898a21dbbd8973647caae0.zip chromium_src-0922baeab1134628d5898a21dbbd8973647caae0.tar.gz chromium_src-0922baeab1134628d5898a21dbbd8973647caae0.tar.bz2 |
linux: scan more plugin directories, fix bugs
We now scan more directories, sort file entries by mtime, use
realpath() before loading plugins (fixes a Java bug), and de-duplicate
multiple instances of the same plugin.
This matches the Mozilla plugin loading code more closely.
We also ignore xpcom-related errors while loading plugins, as that
breaks layout tests.
I encountered this while attempting to fix QuickTime (need to load
the Totem plugins) but the fix overlaps with the Java one. I believe
neither quite work yet, though.
BUG=16787,19712
TEST=about:plugins should show more plugins
Review URL: http://codereview.chromium.org/173550
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24691 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/native_library_linux.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/base/native_library_linux.cc b/base/native_library_linux.cc index 05050bd..2e5db88 100644 --- a/base/native_library_linux.cc +++ b/base/native_library_linux.cc @@ -16,8 +16,14 @@ namespace base { NativeLibrary LoadNativeLibrary(const FilePath& library_path) { void* dl = dlopen(library_path.value().c_str(), RTLD_LAZY); if (!dl) { - LOG(ERROR) << "dlopen failed when trying to open " << library_path.value() - << ": " << dlerror(); + std::string error_message = dlerror(); + // Some obsolete plugins depend on libxul or libxpcom. + // Ignore the error messages when failing to load these. + if (error_message.find("libxul.so") == std::string::npos && + error_message.find("libxpcom.so") == std::string::npos) { + LOG(ERROR) << "dlopen failed when trying to open " << library_path.value() + << ": " << error_message; + } } return dl; |