Closed
Bug 1439656
Opened 8 years ago
Closed 8 years ago
Doom the cache entry from nsHttpChannel::Cancel under the same conditions as within CloseCacheEntry
Categories
(Core :: Networking: HTTP, enhancement, P3)
Core
Networking: HTTP
Tracking
()
RESOLVED
INVALID
| Tracking | Status | |
|---|---|---|
| firefox60 | --- | affected |
People
(Reporter: mayhemer, Assigned: mayhemer)
References
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
|
3.90 KB,
patch
|
Details | Diff | Splinter Review |
This is files as part (1) from https://bugzilla.mozilla.org/show_bug.cgi?id=1395760#c8
I want to keep the entry in the channel (despite doomed), since some code may expect an entry be present on the channel inside OnStopRequest.
Note that we do close and doom the entry when it's been written to (=initialized) and is not resumable on mStatus of the channel being a failure after we have called OnStopRequest on the listener.
But for sake of (1) we need to doom the entry a bit sooner, since following consumers for the same entry (a new channel) can be created and asking for an entry sooner the canceled channel reaches its onstoprequest call.
Updated•8 years ago
|
Assignee: nobody → honzab.moz
Priority: -- → P3
Whiteboard: [necko-triaged]
| Assignee | ||
Updated•8 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Comment 1•8 years ago
|
||
the comment in nsHttpChannel::Cancel is likely outdated and imprecise. I'm not sure it's that easy to doom in cancel...
I'm no longer sure the concern (1) at https://bugzilla.mozilla.org/show_bug.cgi?id=1395760#c8 is valid, because the scenario happens quite often and we would probably already know we serve a broken content on charset reload. not sure, tho...
| Assignee | ||
Comment 2•8 years ago
|
||
(In reply to Honza Bambas (:mayhemer) from comment #0)
> This is files as part (1) from
> https://bugzilla.mozilla.org/show_bug.cgi?id=1395760#c8
>
> I want to keep the entry in the channel (despite doomed), since some code
> may expect an entry be present on the channel inside OnStopRequest.
>
> Note that we do close and doom the entry when it's been written to
> (=initialized) and is not resumable on mStatus of the channel being a
> failure after we have called OnStopRequest on the listener.
>
> But for sake of (1) we need to doom the entry a bit sooner, since following
> consumers for the same entry (a new channel) can be created and asking for
> an entry sooner the canceled channel reaches its onstoprequest call.
OK, this IS INVALID. the second channel will see that the entry is being written and not resumable and will wait for the entry completion prior continuing, https://searchfox.org/mozilla-central/rev/61d400da1c692453c2dc2c1cf37b616ce13dea5b/netwerk/protocol/http/nsHttpChannel.cpp#4043, or bypass for top level loads (charset reload falls to that category), https://searchfox.org/mozilla-central/rev/61d400da1c692453c2dc2c1cf37b616ce13dea5b/netwerk/protocol/http/nsHttpChannel.cpp#4036.
the entry will be doomed prior releasing from the first channel, hence, the follower will not get an entry at all (bug 923688) in the wait-for-complete case
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
| Assignee | ||
Comment 3•8 years ago
|
||
logs in bug 1395760 prove this.
You need to log in
before you can comment on or make changes to this bug.
Description
•