Closed Bug 1038357 Opened 11 years ago Closed 11 years ago

CacheStorageService mForcedValidEntries HashTable should be cleaned up

Categories

(Core :: Networking: Cache, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: jaypoulz, Assigned: jaypoulz)

References

Details

Attachments

(1 file, 3 obsolete files)

Attached patch bug-1038357-fix.patch (obsolete) — Splinter Review
Attachment #8455833 - Flags: feedback?(honzab.moz)
Comment on attachment 8455833 [details] [diff] [review] bug-1038357-fix.patch Review of attachment 8455833 [details] [diff] [review]: ----------------------------------------------------------------- f+ but r-, please fix the comments and if you feel fit, ask for r next time. ::: netwerk/cache2/CacheStorageService.cpp @@ +1057,5 @@ > void CacheStorageService::ForceEntryValidFor(nsACString &aCacheEntryKey, > uint32_t aSecondsToTheFuture) > { > + TimeStamp now = TimeStamp::NowLoRes(); > + ForcedValidEntriesPrune(now); ehm.. this needs to be called under the lock. @@ +1063,4 @@ > mozilla::MutexAutoLock lock(mLock); > > // This will be the timeout > TimeStamp validUntilPtr = TimeStamp::NowLoRes() + reuse |now| here (will be obtained under the lock) @@ +1063,5 @@ > mozilla::MutexAutoLock lock(mLock); > > // This will be the timeout > TimeStamp validUntilPtr = TimeStamp::NowLoRes() + > + TimeDuration::FromSeconds(aSecondsToTheFuture); why are you changing the indention? ::: netwerk/cache2/CacheStorageService.h @@ +163,5 @@ > > + /** > + * Cleans out the entries in mForcedValidEntries that have timed out. > + */ > + void ForcedValidEntriesPrune(TimeStamp &now); put this please under |nsresult AddStorageEntry(nsCSubstring const& aContextKey...| declaration. No need for a comment I think.. The one in the .cpp is enough.
Attachment #8455833 - Flags: feedback?(honzab.moz) → feedback+
Attached patch bug-1038357-fix.patch (obsolete) — Splinter Review
Attachment #8455833 - Attachment is obsolete: true
Attachment #8456245 - Flags: review?(honzab.moz)
Comment on attachment 8456245 [details] [diff] [review] bug-1038357-fix.patch Review of attachment 8456245 [details] [diff] [review]: ----------------------------------------------------------------- r=honzab _with the comments fixed_ ::: netwerk/cache2/CacheStorageService.cpp @@ +1067,1 @@ > TimeDuration::FromSeconds(aSecondsToTheFuture); this is no longer "Ptr" (I repeat myself here...) nit: maybe keep this on one line
Attachment #8456245 - Flags: review?(honzab.moz) → review+
Attached patch bug-1038357-fix.patch (obsolete) — Splinter Review
Attachment #8456245 - Attachment is obsolete: true
Attachment #8456517 - Flags: review+
Keywords: checkin-needed
sorry had to backout this change since bug 1020416 was backedout for causing startup crashes and this resulted a merge conflict from mozilla-inbound to mozilla-central with this patch
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
The .cpp file change was backed out as part of https://hg.mozilla.org/mozilla-central/rev/8da875b402fe though the .h change was not.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
For cleanliness, I backed out the rest in: https://hg.mozilla.org/integration/mozilla-inbound/rev/28b762c2b3e2 so that the patch isn't half-landed.
Thanks! :) I appreciate this! :)
Flags: needinfo?(jaypoulz)
Attachment #8456517 - Attachment is obsolete: true
Attachment #8463576 - Flags: review+
Keywords: checkin-needed
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: