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

Unified Diff: third_party/WebKit/Source/modules/plugins/DOMPluginArray.cpp

Issue 2901353002: Move blink::PluginData, blink::PluginInfo, blink::MimeTypeInfo to oilpan heap. (Closed)
Patch Set: nits, remove dead code Created 3 years, 7 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: third_party/WebKit/Source/modules/plugins/DOMPluginArray.cpp
diff --git a/third_party/WebKit/Source/modules/plugins/DOMPluginArray.cpp b/third_party/WebKit/Source/modules/plugins/DOMPluginArray.cpp
index af7a2bfb5d66dfce3c27691744790da25f4ff906..b3124068deef2b4346b5dbd41059d773ee246d5f 100644
--- a/third_party/WebKit/Source/modules/plugins/DOMPluginArray.cpp
+++ b/third_party/WebKit/Source/modules/plugins/DOMPluginArray.cpp
@@ -46,20 +46,19 @@ DOMPlugin* DOMPluginArray::item(unsigned index) {
PluginData* data = GetPluginData();
if (!data)
return nullptr;
- const Vector<PluginInfo>& plugins = data->Plugins();
+ const HeapVector<Member<PluginInfo>>& plugins = data->Plugins();
if (index >= plugins.size())
return nullptr;
- return DOMPlugin::Create(data, GetFrame(), index);
+ return DOMPlugin::Create(GetFrame(), *plugins[index]);
}
DOMPlugin* DOMPluginArray::namedItem(const AtomicString& property_name) {
PluginData* data = GetPluginData();
if (!data)
return nullptr;
- const Vector<PluginInfo>& plugins = data->Plugins();
- for (unsigned i = 0; i < plugins.size(); ++i) {
- if (plugins[i].name == property_name)
- return DOMPlugin::Create(data, GetFrame(), i);
+ for (const PluginInfo* plugin : data->Plugins()) {
+ if (plugin->Name() == property_name)
+ return DOMPlugin::Create(GetFrame(), *plugin);
}
return nullptr;
}
« no previous file with comments | « third_party/WebKit/Source/modules/plugins/DOMPlugin.cpp ('k') | third_party/WebKit/Source/platform/plugins/PluginData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698