From 4349e914520b45eaab2c32ee66ebf310f81e2006 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Tue, 8 Nov 2011 15:22:15 -0500 Subject: [PATCH] Bug 700659 - Slay nsHashSets in netwerk. r=jduell --- netwerk/cache/nsDiskCacheDeviceSQL.cpp | 8 ++++---- netwerk/cache/nsDiskCacheDeviceSQL.h | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/netwerk/cache/nsDiskCacheDeviceSQL.cpp b/netwerk/cache/nsDiskCacheDeviceSQL.cpp index 4cb1c4d98cdb..fff264a73994 100644 --- a/netwerk/cache/nsDiskCacheDeviceSQL.cpp +++ b/netwerk/cache/nsDiskCacheDeviceSQL.cpp @@ -1218,7 +1218,7 @@ nsOfflineCacheDevice::InitActiveCaches() nsCString clientID; statement->GetUTF8String(1, clientID); - mActiveCaches.Put(clientID); + mActiveCaches.PutEntry(clientID); mActiveCachesByGroup.Put(group, new nsCString(clientID)); rv = statement->ExecuteStep(&hasRows); @@ -2182,7 +2182,7 @@ nsOfflineCacheDevice::DeactivateGroup(const nsACString &group) if (mActiveCachesByGroup.Get(group, &active)) { - mActiveCaches.Remove(*active); + mActiveCaches.RemoveEntry(*active); mActiveCachesByGroup.Remove(group); active = nsnull; } @@ -2323,14 +2323,14 @@ nsOfflineCacheDevice::ActivateCache(const nsCSubstring &group, nsCString *active; if (mActiveCachesByGroup.Get(group, &active)) { - mActiveCaches.Remove(*active); + mActiveCaches.RemoveEntry(*active); mActiveCachesByGroup.Remove(group); active = nsnull; } if (!clientID.IsEmpty()) { - mActiveCaches.Put(clientID); + mActiveCaches.PutEntry(clientID); mActiveCachesByGroup.Put(group, new nsCString(clientID)); } diff --git a/netwerk/cache/nsDiskCacheDeviceSQL.h b/netwerk/cache/nsDiskCacheDeviceSQL.h index 218b0ee00529..6c1f01469149 100644 --- a/netwerk/cache/nsDiskCacheDeviceSQL.h +++ b/netwerk/cache/nsDiskCacheDeviceSQL.h @@ -51,7 +51,6 @@ #include "nsCOMArray.h" #include "nsInterfaceHashtable.h" #include "nsClassHashtable.h" -#include "nsHashSets.h" #include "nsWeakReference.h" class nsIURI; @@ -271,7 +270,7 @@ private: nsInterfaceHashtable mCaches; nsClassHashtable mActiveCachesByGroup; - nsCStringHashSet mActiveCaches; + nsTHashtable mActiveCaches; nsCOMPtr mInitThread; };