Closed Bug 1378083 Opened 7 years ago Closed 7 years ago

Assertion failure: !mListener in CacheFileChunk::Hash()

Categories

(Core :: Networking: Cache, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: michal, Assigned: michal)

Details

(Whiteboard: [necko-active])

Attachments

(1 file)

When updating a hash at http://searchfox.org/mozilla-central/rev/a3a739de04ee6134c11546568a33dbb6a6a29907/netwerk/cache2/CacheFile.cpp#2056 the chunk can be in WRITING state and mListener isn't null. There is no reason to really check mListener in CacheFileChunk::Hash().
Attached patch fixSplinter Review
This patch also adds a check into CacheFile::OpenOutputStream and CacheFile::OpenAlternativeOutputStream to prevent returning an output stream in case of failed CacheFile.
Attachment #8883242 - Flags: review?(valentin.gosu)
Comment on attachment 8883242 [details] [diff] [review]
fix

Review of attachment 8883242 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good.
Attachment #8883242 - Flags: review?(valentin.gosu) → review+
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/fb1927955a0b
Assertion failure: !mListener in CacheFileChunk::Hash(), r=valentin
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/fb1927955a0b
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: