Closed Bug 644841 Opened 14 years ago Closed 9 years ago

NS_ASSERTION(targetCapacity > 0) in nsDiskCacheDevice::EvictDiskCacheEntries

Categories

(Core :: Networking: Cache, defect)

defect
Not set
minor

Tracking

()

RESOLVED WONTFIX

People

(Reporter: michal, Unassigned)

Details

Attachments

(1 file)

Attached patch fixSplinter Review
The assertion should be IMO removed because 0 is a valid value for targetCapacity. User can set the cache capacity to 0. Zero can be also passed from nsDiskCacheDevice::OnDataSizeChange (http://hg.mozilla.org/mozilla-central/annotate/8618a149ea2e/netwerk/cache/nsDiskCacheDevice.cpp#l803).
Attachment #521686 - Flags: review?(bjarne)
Comment on attachment 521686 [details] [diff] [review] fix Yes, I agree that 0 seems to be a valid value. However, please add a comment about and make sure the eviction-loop behaves properly if 0 is used. Ref first line in nsDiskCacheEvictor::VisitRecord() (i.e. mCacheMap->TotalSize() can probably never be less than 0?)
Attachment #521686 - Flags: review?(bjarne) → review-
all new cache code
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: