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

Unified Diff: webkit/plugins/npapi/plugin_lib_posix.cc

Issue 6864020: linux: don't always print dlopen errors from LoadNativeLibrary (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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
Index: webkit/plugins/npapi/plugin_lib_posix.cc
diff --git a/webkit/plugins/npapi/plugin_lib_posix.cc b/webkit/plugins/npapi/plugin_lib_posix.cc
index debd4579e706b2dbb74db7ac80f5aedd07838e69..76659c4cd2e45b92baa5fdec18a5a1b27c22093b 100644
--- a/webkit/plugins/npapi/plugin_lib_posix.cc
+++ b/webkit/plugins/npapi/plugin_lib_posix.cc
@@ -116,13 +116,15 @@ void UnwrapNSPluginWrapper(void **dl, FilePath* unwrapped_path) {
return;
}
- void* newdl = base::LoadNativeLibrary(path);
+ std::string error;
+ void* newdl = base::LoadNativeLibrary(path, &error);
if (!newdl) {
// We couldn't load the unwrapped plugin for some reason, despite
// being able to load the wrapped one. Just use the wrapped one.
LOG_IF(ERROR, PluginList::DebugPluginLoading())
<< "Could not use unwrapped nspluginwrapper plugin "
- << unwrapped_path->value() << ", using the wrapped one.";
+ << unwrapped_path->value() << " (" << error << "), "
+ << "using the wrapped one.";
return;
}
@@ -150,11 +152,12 @@ bool PluginLib::ReadWebPluginInfo(const FilePath& filename,
return false;
}
- void* dl = base::LoadNativeLibrary(filename);
+ std::string error;
+ void* dl = base::LoadNativeLibrary(filename, &error);
if (!dl) {
LOG_IF(ERROR, PluginList::DebugPluginLoading())
<< "While reading plugin info, unable to load library "
- << filename.value() << ", skipping.";
+ << filename.value() << " (" << error << "), skipping.";
return false;
}

Powered by Google App Engine
This is Rietveld 408576698