Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6995)

Unified Diff: base/native_library_linux.cc

Issue 173550: linux: scan more plugin directories, fix bugs (Closed)
Patch Set: fixes Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webkit/glue/plugins/plugin_list_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/native_library_linux.cc
diff --git a/base/native_library_linux.cc b/base/native_library_linux.cc
index 05050bdcf036d4f08a6d857a16cfca8929e125c4..2e5db88633981114cbddc78744263cbaff98b785 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;
« no previous file with comments | « no previous file | webkit/glue/plugins/plugin_list_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698