Closed Bug 1274585 Opened 9 years ago Closed 9 years ago

Push HTTP cache index build when asked for disk cache size

Categories

(Core :: Networking: Cache, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: mayhemer, Assigned: mayhemer)

References

Details

(Whiteboard: [necko-active])

Attachments

(1 file, 4 obsolete files)

No description provided.
Blocks: 428916
Attached patch v1 (obsolete) — Splinter Review
Attachment #8754842 - Flags: review?(michal.novotny)
Comment on attachment 8754842 [details] [diff] [review] v1 This seems to be a wrong patch.
Flags: needinfo?(honzab.moz)
Attachment #8754842 - Flags: review?(michal.novotny)
Attached patch v1 (obsolete) — Splinter Review
This is the one.
Attachment #8754842 - Attachment is obsolete: true
Flags: needinfo?(honzab.moz)
Attachment #8755110 - Flags: review?(michal.novotny)
Comment on attachment 8755110 [details] [diff] [review] v1 Review of attachment 8755110 [details] [diff] [review]: ----------------------------------------------------------------- ::: netwerk/cache2/CacheIndex.cpp @@ +1372,5 @@ > + // Move forward with index re/building if it is pending > + RefPtr<CacheIOThread> ioThread = CacheFileIOManager::IOThread(); > + if (ioThread) { > + ioThread->Dispatch(NS_NewRunnableFunction([]() -> void { > + RefPtr<CacheIndex> index = gInstance; gInstance must be accessed under sLock
Attachment #8755110 - Flags: review?(michal.novotny) → feedback+
Whiteboard: [necko-active]
Attached patch v1.1 (obsolete) — Splinter Review
Attachment #8755110 - Attachment is obsolete: true
Attachment #8756364 - Flags: review?(michal.novotny)
Comment on attachment 8756364 [details] [diff] [review] v1.1 Review of attachment 8756364 [details] [diff] [review]: ----------------------------------------------------------------- ::: netwerk/cache2/CacheIndex.cpp @@ +1378,5 @@ > + RefPtr<CacheIndex> index = gInstance; > + if (index && index->mUpdateTimer) { > + index->mUpdateTimer->Cancel(); > + index->mUpdateTimer = nullptr; > + index->DelayedUpdate(nullptr, nullptr); DelayedUpdate() grabs the lock too, so you have to call it outside the lock.
Attachment #8756364 - Flags: review?(michal.novotny) → feedback+
Attached patch v1.2 (obsolete) — Splinter Review
Attachment #8756364 - Attachment is obsolete: true
Attachment #8757370 - Flags: review?(michal.novotny)
Comment on attachment 8757370 [details] [diff] [review] v1.2 Review of attachment 8757370 [details] [diff] [review]: ----------------------------------------------------------------- ::: netwerk/cache2/CacheIndex.cpp @@ +2517,5 @@ > +} > + > +// static > +void > +CacheIndex::DelayedUpdateUnlocked() If think DelayedUpdateLocked makes IMO more sense. @@ +2523,1 @@ > LOG(("CacheIndex::DelayedUpdate()")); Please update logged names too. @@ +2529,5 @@ > RefPtr<CacheIndex> index = gInstance; > > if (!index) { > return; > } Could you make DelayedUpdateLocked non-static method and check gInstance in DelayedUpdate?
Attachment #8757370 - Flags: review?(michal.novotny) → feedback+
Attached patch v1.3Splinter Review
Attachment #8757370 - Attachment is obsolete: true
Attachment #8757890 - Flags: review?(michal.novotny)
Comment on attachment 8757890 [details] [diff] [review] v1.3 Review of attachment 8757890 [details] [diff] [review]: ----------------------------------------------------------------- thanks!
Attachment #8757890 - Flags: review?(michal.novotny) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: