Bug 700659 - Slay nsHashSets in netwerk. r=jduell

This commit is contained in:
Nathan Froyd
2011-11-08 15:22:15 -05:00
parent 88953c3019
commit 3032d3dd2c
2 changed files with 5 additions and 6 deletions

View File

@@ -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));
}

View File

@@ -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<nsCStringHashKey, nsIWeakReference> mCaches;
nsClassHashtable<nsCStringHashKey, nsCString> mActiveCachesByGroup;
nsCStringHashSet mActiveCaches;
nsTHashtable<nsCStringHashKey> mActiveCaches;
nsCOMPtr<nsIThread> mInitThread;
};