зеркало из https://github.com/mozilla/gecko-dev.git
Bug 700659 - Slay nsHashSets in netwerk. r=jduell
This commit is contained in:
Родитель
56b8047d2b
Коммит
4349e91452
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче