Backed out changeset 0e127c7f69c4 (bug 1160166) for e10s LSAN leaks.
authorRyan VanderMeulen <ryanvm@gmail.com>
Mon, 13 Jul 2015 14:32:29 -0400
changeset 252545 61df86ca9b50edb3c1bae520963627272ecde98e
parent 252544 937dceaf44d9c1e478cfad9f033761bb92728c1a
child 252643 f101a510a21073fee34dfb0128f43b2e3445aba5
push id13986
push userryanvm@gmail.com
push dateMon, 13 Jul 2015 18:32:29 +0000
treeherderfx-team@61df86ca9b50 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1160166
milestone42.0a1
backs out0e127c7f69c4e34957025c9f6179331c1192628a
Backed out changeset 0e127c7f69c4 (bug 1160166) for e10s LSAN leaks. CLOSED TREE
dom/plugins/base/nsPluginHost.cpp
--- a/dom/plugins/base/nsPluginHost.cpp
+++ b/dom/plugins/base/nsPluginHost.cpp
@@ -2506,23 +2506,22 @@ nsPluginHost::FindPluginsForContent(uint
   // Load plugins so that the epoch is correct.
   LoadPlugins();
 
   *aNewPluginEpoch = ChromeEpoch();
   if (aPluginEpoch == ChromeEpoch()) {
     return;
   }
 
-  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]);
+  nsTArray<nsRefPtr<nsPluginTag>> plugins;
+  GetPlugins(plugins);
+
+  for (size_t i = 0; i < plugins.Length(); i++) {
+    nsRefPtr<nsPluginTag> tag = 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,