Bug 700659 - Slay nsHashSets in layout. r=dbaron
authorNathan Froyd <froydnj@mozilla.com>
Tue, 08 Nov 2011 15:24:37 -0500
changeset 87740 6735b4f3a4c474b74807a8a566e409fb04635bae
parent 87739 a94b06b567735581254adc31cb814331fef3fec6
child 87741 a41cc70ce9c247aefcdf500dee25f20849e23432
push id22143
push userphilringnalda@gmail.com
push dateSun, 26 Feb 2012 23:12:35 +0000
treeherdermozilla-central@b98fc24ac54b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs700659
milestone13.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 700659 - Slay nsHashSets in layout. r=dbaron
layout/generic/nsFloatManager.cpp
--- a/layout/generic/nsFloatManager.cpp
+++ b/layout/generic/nsFloatManager.cpp
@@ -37,17 +37,16 @@
  * ***** END LICENSE BLOCK ***** */
 
 /* class that manages rules for positioning floats */
 
 #include "nsFloatManager.h"
 #include "nsIPresShell.h"
 #include "nsMemory.h"
 #include "nsHTMLReflowState.h"
-#include "nsHashSets.h"
 #include "nsBlockDebugFlags.h"
 #include "nsContentErrors.h"
 
 using namespace mozilla;
 
 PRInt32 nsFloatManager::sCachedFloatManagerCount = 0;
 void* nsFloatManager::sCachedFloatManagers[NS_FLOAT_MANAGER_CACHE_SIZE];
 
@@ -363,21 +362,21 @@ nsFloatManager::RemoveTrailingRegions(ns
 {
   if (!aFrameList) {
     return NS_OK;
   }
   // This could be a good bit simpler if we could guarantee that the
   // floats given were at the end of our list, so we could just search
   // for the head of aFrameList.  (But we can't;
   // layout/reftests/bugs/421710-1.html crashes.)
-  nsVoidHashSet frameSet;
+  nsTHashtable<nsPtrHashKey<nsIFrame> > frameSet;
 
   frameSet.Init(1);
   for (nsIFrame* f = aFrameList; f; f = f->GetNextSibling()) {
-    frameSet.Put(f);
+    frameSet.PutEntry(f);
   }
 
   PRUint32 newLength = mFloats.Length();
   while (newLength > 0) {
     if (!frameSet.Contains(mFloats[newLength - 1].mFrame)) {
       break;
     }
     --newLength;