Bug 1166598 (part 8) - Use PLDHashTable2 in nsHostResolver. r=froydnj.

This commit is contained in:
Nicholas Nethercote 2015-05-12 17:33:45 -07:00
parent f2a4282f7b
commit 7476f38014
2 changed files with 2 additions and 6 deletions

View File

@ -552,6 +552,7 @@ nsHostResolver::nsHostResolver(uint32_t maxCacheEntries,
, mNumIdleThreads(0)
, mThreadCount(0)
, mActiveAnyThreadCount(0)
, mDB(&gHostDB_ops, sizeof(nsHostDBEnt), 0)
, mEvictionQSize(0)
, mPendingCount(0)
, mShutdown(true)
@ -568,7 +569,6 @@ nsHostResolver::nsHostResolver(uint32_t maxCacheEntries,
nsHostResolver::~nsHostResolver()
{
PL_DHashTableFinish(&mDB);
}
nsresult
@ -578,8 +578,6 @@ nsHostResolver::Init()
return NS_ERROR_FAILURE;
}
PL_DHashTableInit(&mDB, &gHostDB_ops, sizeof(nsHostDBEnt), 0);
mShutdown = false;
#if TTL_AVAILABLE
@ -1496,8 +1494,6 @@ nsHostResolver::Create(uint32_t maxCacheEntries,
nsHostResolver *res = new nsHostResolver(maxCacheEntries, defaultCacheEntryLifetime,
defaultGracePeriod);
if (!res)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(res);
nsresult rv = res->Init();

View File

@ -345,7 +345,7 @@ private:
uint32_t mNumIdleThreads;
uint32_t mThreadCount;
uint32_t mActiveAnyThreadCount;
PLDHashTable mDB;
PLDHashTable2 mDB;
PRCList mHighQ;
PRCList mMediumQ;
PRCList mLowQ;