mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 567680 - nsMemoryCacheDevide::BindEntry increments the entry count for doomed entries; r=bzbarsky
This commit is contained in:
parent
6f913f6a1f
commit
9d7dcbc2fe
22
netwerk/cache/src/nsMemoryCacheDevice.cpp
vendored
22
netwerk/cache/src/nsMemoryCacheDevice.cpp
vendored
@ -190,10 +190,10 @@ nsMemoryCacheDevice::DeactivateEntry(nsCacheEntry * entry)
|
||||
nsresult
|
||||
nsMemoryCacheDevice::BindEntry(nsCacheEntry * entry)
|
||||
{
|
||||
if (!entry->IsDoomed()) {
|
||||
NS_ASSERTION(PR_CLIST_IS_EMPTY(entry),"entry is already on a list!");
|
||||
|
||||
// append entry to the eviction list
|
||||
if (!entry->IsDoomed()) {
|
||||
NS_ASSERTION(PR_CLIST_IS_EMPTY(entry),"entry is already on a list!");
|
||||
|
||||
// append entry to the eviction list
|
||||
PR_APPEND_LINK(entry, &mEvictionList[EvictionList(entry, 0)]);
|
||||
|
||||
// add entry to hashtable of mem cache entries
|
||||
@ -202,15 +202,15 @@ nsMemoryCacheDevice::BindEntry(nsCacheEntry * entry)
|
||||
PR_REMOVE_AND_INIT_LINK(entry);
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
// add size of entry to memory totals
|
||||
++mEntryCount;
|
||||
if (mMaxEntryCount < mEntryCount) mMaxEntryCount = mEntryCount;
|
||||
// add size of entry to memory totals
|
||||
++mEntryCount;
|
||||
if (mMaxEntryCount < mEntryCount) mMaxEntryCount = mEntryCount;
|
||||
|
||||
mTotalSize += entry->Size();
|
||||
EvictEntriesIfNecessary();
|
||||
}
|
||||
|
||||
mTotalSize += entry->Size();
|
||||
EvictEntriesIfNecessary();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user