summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-19 13:06:24 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-19 13:06:24 +0000
commitb3f34ea2ccc0b0b0e9b36c0d13181e03ff363ec5 (patch)
tree4e68ae5545de4f398f89ccae1f570d1671169a77
parente2d0ff7cc1b84e4a2121d559635ff236ffea7095 (diff)
downloadchromium_src-b3f34ea2ccc0b0b0e9b36c0d13181e03ff363ec5.zip
chromium_src-b3f34ea2ccc0b0b0e9b36c0d13181e03ff363ec5.tar.gz
chromium_src-b3f34ea2ccc0b0b0e9b36c0d13181e03ff363ec5.tar.bz2
linux: move plugin blacklist check earlier
Plugins load in two stages: first we dlopen() them to query metadata, then later in response to a page request we actually instantiate them. The blacklist we had in place only happened at the latter point; gecko-mediaplayer causes us to hang in the first step. So move the blacklist check earlier to succesfully blacklist it. We eventually should just fix the bugs that cause this plugin to hang us, but this will fix things for users right now. BUG=24507,40221 TEST=run with --log-level=0 --debug-plugin-loading and verify gecko-mediaplayer is still blacklisted Review URL: http://codereview.chromium.org/2114011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47656 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/glue/plugins/plugin_list_posix.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/webkit/glue/plugins/plugin_list_posix.cc b/webkit/glue/plugins/plugin_list_posix.cc
index 355c2ec..3a59aeb2 100644
--- a/webkit/glue/plugins/plugin_list_posix.cc
+++ b/webkit/glue/plugins/plugin_list_posix.cc
@@ -60,12 +60,12 @@ bool IsUndesirablePlugin(const WebPluginInfo& info) {
// http://code.google.com/p/chromium/issues/detail?id=38229
// The gecko-mediaplayer plugins also crashes the entire browser sometimes.
// http://code.google.com/p/chromium/issues/detail?id=24507
-bool IsBlacklistedPlugin(const WebPluginInfo& info) {
+bool IsBlacklistedPlugin(const FilePath& path) {
const char* kBlackListedPlugins[] = {
"nppdf.so", // Adobe PDF
"gecko-mediaplayer", // Gecko Media Player
};
- std::string filename = info.path.BaseName().value();
+ std::string filename = path.BaseName().value();
for (size_t i = 0; i < arraysize(kBlackListedPlugins); i++) {
if (filename.find(kBlackListedPlugins[i]) != std::string::npos) {
return true;
@@ -166,6 +166,11 @@ void PluginList::LoadPluginsFromDir(const FilePath& dir_path,
}
visited_plugins->insert(path);
+ if (IsBlacklistedPlugin(path)) {
+ PLUG_LOG << "Skipping blacklisted plugin " << path.value();
+ continue;
+ }
+
// Flash stops working if the containing directory involves 'netscape'.
// No joke. So use the other path if it's better.
static const char kFlashPlayerFilename[] = "libflashplayer.so";
@@ -204,11 +209,6 @@ bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info,
std::vector<WebPluginInfo>* plugins) {
PLUG_LOG << "Considering " << info.path.value() << " (" << info.name << ")";
- if (IsBlacklistedPlugin(info)) {
- PLUG_LOG << "Skipping blacklisted plugin " << info.path.value();
- return false;
- }
-
if (IsUndesirablePlugin(info)) {
PLUG_LOG << info.path.value() << " is undesirable.";