mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 12:55:46 +00:00
fix for rtm++ bug 54630 - Disk cache not writing files after 512 files reached. r=dp, sr=rpotts
This commit is contained in:
parent
3d941fde1e
commit
70a7f66f5c
11
netwerk/cache/mgr/nsReplacementPolicy.cpp
vendored
11
netwerk/cache/mgr/nsReplacementPolicy.cpp
vendored
@ -595,9 +595,14 @@ nsReplacementPolicy::DeleteAtleastOneEntry(nsINetDataCache *aCache,
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
if (targetNumEntries >= numRecordEntries)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
/* Figure out if we are our end condition is number of entries or records */
|
||||
if (targetNumEntries >= numRecordEntries) {
|
||||
if (targetNumEntries < mNumEntries) {
|
||||
numRecordEntries = mNumEntries;
|
||||
}
|
||||
else
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
// It's not possible to rank cache entries by their profitability
|
||||
// until all of them are known to the replacement policy.
|
||||
|
Loading…
Reference in New Issue
Block a user