mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1166598 (part 8) - Use PLDHashTable2 in nsHostResolver. r=froydnj.
This commit is contained in:
parent
f2a4282f7b
commit
7476f38014
@ -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();
|
||||
|
@ -345,7 +345,7 @@ private:
|
||||
uint32_t mNumIdleThreads;
|
||||
uint32_t mThreadCount;
|
||||
uint32_t mActiveAnyThreadCount;
|
||||
PLDHashTable mDB;
|
||||
PLDHashTable2 mDB;
|
||||
PRCList mHighQ;
|
||||
PRCList mMediumQ;
|
||||
PRCList mLowQ;
|
||||
|
Loading…
Reference in New Issue
Block a user