Bug 700659 - Slay nsHashSets in xpcom/base. r=khuey
authorNathan Froyd <froydnj@mozilla.com>
Tue, 08 Nov 2011 15:25:33 -0500
changeset 87738 f66366413f66939041e4faa0307356fef1dd06f4
parent 87737 7aaa5f1f685e5fb372c83372820ef62322036993
child 87739 a94b06b567735581254adc31cb814331fef3fec6
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)
reviewerskhuey
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 xpcom/base. r=khuey
xpcom/base/MapsMemoryReporter.cpp
--- a/xpcom/base/MapsMemoryReporter.cpp
+++ b/xpcom/base/MapsMemoryReporter.cpp
@@ -38,17 +38,18 @@
  * ***** END LICENSE BLOCK ***** */
 
 #include "mozilla/Util.h"
 
 #include "mozilla/MapsMemoryReporter.h"
 #include "nsIMemoryReporter.h"
 #include "nsString.h"
 #include "nsCOMPtr.h"
-#include "nsHashSets.h"
+#include "nsTHashtable.h"
+#include "nsHashKeys.h"
 #include <stdio.h>
 
 namespace mozilla {
 namespace MapsMemoryReporter {
 
 #if !defined(XP_LINUX)
 #error "This doesn't have a prayer of working if we're not on Linux."
 #endif
@@ -188,30 +189,30 @@ private:
                const nsACString &aName,
                const nsACString &aDescription,
                nsIMemoryMultiReporterCallback *aCallback,
                nsISupports *aClosure,
                CategoriesSeen *aCategoriesSeen);
 
   bool mSearchedForLibxul;
   nsCString mLibxulDir;
-  nsCStringHashSet mMozillaLibraries;
+  nsTHashtable<nsCStringHashKey> mMozillaLibraries;
 };
 
 NS_IMPL_THREADSAFE_ISUPPORTS1(MapsReporter, nsIMemoryMultiReporter)
 
 MapsReporter::MapsReporter()
   : mSearchedForLibxul(false)
 {
   const PRUint32 len = ArrayLength(mozillaLibraries);
   mMozillaLibraries.Init(len);
   for (PRUint32 i = 0; i < len; i++) {
     nsCAutoString str;
     str.Assign(mozillaLibraries[i]);
-    mMozillaLibraries.Put(str);
+    mMozillaLibraries.PutEntry(str);
   }
 }
 
 NS_IMETHODIMP
 MapsReporter::CollectReports(nsIMemoryMultiReporterCallback *aCallback,
                              nsISupports *aClosure)
 {
   CategoriesSeen categoriesSeen;