summaryrefslogtreecommitdiffstats
path: root/webkit/plugins/npapi/plugin_list.cc
diff options
context:
space:
mode:
authorpastarmovj@chromium.org <pastarmovj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-25 22:47:00 +0000
committerpastarmovj@chromium.org <pastarmovj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-25 22:47:00 +0000
commitcd91aff2f0ced8ac9027e35f5ee82400d7fa5298 (patch)
tree8ee57a177235920cd4f5ffca4eeec0a7428a451b /webkit/plugins/npapi/plugin_list.cc
parentf264e8f23079e13126ee24b568bef9a0af6e096b (diff)
downloadchromium_src-cd91aff2f0ced8ac9027e35f5ee82400d7fa5298.zip
chromium_src-cd91aff2f0ced8ac9027e35f5ee82400d7fa5298.tar.gz
chromium_src-cd91aff2f0ced8ac9027e35f5ee82400d7fa5298.tar.bz2
Fixed grave bug in Plugin Loading code that lead to a crash with some plugins.
When plugins are not properly written they don't supply any identificatrion info through their api which used to kill the plugin loading code. BUG=70775 TEST=test_shell_tests-PluginListTest.BadPluginDescription Review URL: http://codereview.chromium.org/6324014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72557 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/npapi/plugin_list.cc')
-rw-r--r--webkit/plugins/npapi/plugin_list.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/webkit/plugins/npapi/plugin_list.cc b/webkit/plugins/npapi/plugin_list.cc
index ab1b9dc..a4da48d 100644
--- a/webkit/plugins/npapi/plugin_list.cc
+++ b/webkit/plugins/npapi/plugin_list.cc
@@ -711,13 +711,6 @@ PluginGroup* PluginList::AddToPluginGroups(
}
if (!group) {
group = PluginGroup::FromWebPluginInfo(web_plugin_info);
- // If group is scheduled for disabling do that now and remove it from the
- // list.
- if (groups_to_disable_.find(group->GetGroupName()) !=
- groups_to_disable_.end()) {
- group->EnableGroup(false);
- groups_to_disable_.erase(group->GetGroupName());
- }
std::string identifier = group->identifier();
// If the identifier is not unique, use the full path. This means that we
// probably won't be able to search for this group by identifier, but at
@@ -734,6 +727,13 @@ PluginGroup* PluginList::AddToPluginGroups(
plugin_groups->push_back(group);
}
group->AddPlugin(web_plugin_info);
+ // If group is scheduled for disabling do that now and remove it from the
+ // list.
+ if (groups_to_disable_.find(group->GetGroupName()) !=
+ groups_to_disable_.end()) {
+ group->EnableGroup(false);
+ groups_to_disable_.erase(group->GetGroupName());
+ }
return group;
}