bug 1160166 - Disabled plugin meta information often isn't available to content processes r=jimm
☠☠ backed out by 61df86ca9b50 ☠ ☠
authorBrad Lassey <blassey@mozilla.com>
Mon, 13 Jul 2015 12:39:18 -0400
changeset 252542 0e127c7f69c4e34957025c9f6179331c1192628a
parent 252541 e81c94ce31457e3d649f90164799dac8984ab4d7
child 252543 bcd122bc666a31401cc579c13af0bcd0b89c2705
push id13983
push userblassey@mozilla.com
push dateMon, 13 Jul 2015 16:47:52 +0000
treeherderfx-team@0e127c7f69c4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1160166
milestone42.0a1
bug 1160166 - Disabled plugin meta information often isn't available to content processes r=jimm
dom/plugins/base/nsPluginHost.cpp
--- a/dom/plugins/base/nsPluginHost.cpp
+++ b/dom/plugins/base/nsPluginHost.cpp
@@ -2506,22 +2506,23 @@ nsPluginHost::FindPluginsForContent(uint
   // Load plugins so that the epoch is correct.
   LoadPlugins();
 
   *aNewPluginEpoch = ChromeEpoch();
   if (aPluginEpoch == ChromeEpoch()) {
     return;
   }
 
-  nsTArray<nsRefPtr<nsPluginTag>> plugins;
-  GetPlugins(plugins);
-
-  for (size_t i = 0; i < plugins.Length(); i++) {
-    nsRefPtr<nsPluginTag> tag = plugins[i];
-
+  uint32_t count;
+  nsIPluginTag** plugins;
+  GetPluginTags(&count, &plugins);
+
+  for (size_t i = 0; i < count; i++) {
+    nsRefPtr<nsPluginTag> tag = static_cast<nsPluginTag*>(plugins[i]);
+    NS_RELEASE(plugins[i]);
     if (!nsNPAPIPlugin::RunPluginOOP(tag)) {
       // Don't expose non-OOP plugins to content processes since we have no way
       // to bridge them over.
       continue;
     }
 
     aPlugins->AppendElement(PluginTag(tag->mId,
                                       tag->mName,