Closed
Bug 922659
Opened 12 years ago
Closed 12 years ago
HTTP cache v2: exception from onCacheEntryCheck should cause NOT_FOUND
Categories
(Core :: Networking: Cache, defect)
Core
Networking: Cache
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: mayhemer, Assigned: mayhemer)
References
Details
(Whiteboard: [qa-])
Attachments
(1 file, 1 obsolete file)
|
997 bytes,
patch
|
michal
:
review+
mayhemer
:
checkin+
|
Details | Diff | Splinter Review |
Regression from https://hg.mozilla.org/projects/gum/diff/712fb1b90d6b/netwerk/cache2/CacheEntry.cpp
1.64 - nsresult rv = aCallback->OnCacheEntryCheck(this, nullptr, &validityState);
1.65 - LOG((" OnCacheEntryCheck result: rv=0x%08x, validity=%d", rv, validityState));
1.66 + nsresult rv = aCallback->OnCacheEntryCheck(this, nullptr, &checkResult);
1.67 + LOG((" OnCacheEntryCheck: rv=0x%08x, result=%d", rv, checkResult));
1.68
1.69 if (NS_FAILED(rv))
1.70 - validityState = ENTRY_NOT_VALID;
1.71 + checkResult = ENTRY_WANTED;
1.72 }
When the onCacheEntryCheck callback throws (what in this case happens since the range request cannot be established) the entry is still passed to onCacheEntryAvailable. Originally, before the change I refer above, the entry was thrown away. So, we need to change ENTRY_WANTED to ENTRY_NOT_WANTED on onCacheEntryCheck failure.
This is not critical since the entry won't be used base on !mCacheContentIsValid.
| Assignee | ||
Comment 1•12 years ago
|
||
This needs just a formal review since it's disabled by default.
Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
Attachment #812690 -
Flags: review?(michal.novotny)
| Assignee | ||
Comment 2•12 years ago
|
||
- remerged
Attachment #812690 -
Attachment is obsolete: true
Attachment #812690 -
Flags: review?(michal.novotny)
Attachment #827980 -
Flags: review?(michal.novotny)
Updated•12 years ago
|
Attachment #827980 -
Flags: review?(michal.novotny) → review+
| Assignee | ||
Comment 3•12 years ago
|
||
Comment on attachment 827980 [details] [diff] [review]
v1 [merged]
https://hg.mozilla.org/integration/mozilla-inbound/rev/59edeb46f2d6
https://tbpl.mozilla.org/?tree=Try&rev=69d73cf7f79a
Attachment #827980 -
Flags: checkin+
Comment 4•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Updated•12 years ago
|
Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•