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

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: 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..3cd8bbf47c552c16f38792924c40a5adf69737cb 100644
--- a/third_party/WebKit/Source/modules/plugins/DOMPluginArray.cpp
+++ b/third_party/WebKit/Source/modules/plugins/DOMPluginArray.cpp
@@ -46,20 +46,20 @@ 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);
+ const HeapVector<Member<PluginInfo>>& plugins = data->Plugins();
+ for (const PluginInfo* plugin : plugins) {
tkent 2017/05/25 00:10:32 The local variable |plugins| isn't necessary. for
lfg 2017/05/25 01:42:40 Done.
+ if (plugin->name() == property_name)
+ return DOMPlugin::Create(GetFrame(), plugin);
}
return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698