Closed
Bug 1395837
Opened 7 years ago
Closed 6 years ago
Intercepted nsIHttpChannels, when canceled, do not call OnStopRequest
Categories
(Core :: Networking: HTTP, defect, P2)
Core
Networking: HTTP
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: baku, Assigned: baku)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-active])
Attachments
(1 file)
10.38 KB,
patch
|
mayhemer
:
review+
|
Details | Diff | Splinter Review |
I and mayhemer discussed this on IRC.
Assignee | ||
Comment 1•7 years ago
|
||
Attachment #8903477 -
Flags: review?(honzab.moz)
![]() |
||
Comment 2•7 years ago
|
||
Comment on attachment 8903477 [details] [diff] [review]
network_4.patch
Review of attachment 8903477 [details] [diff] [review]:
-----------------------------------------------------------------
r+ but except where noted.
::: netwerk/protocol/http/InterceptedChannel.cpp
@@ +521,5 @@
> } else {
> responseURI = originalURI;
> }
>
> + mChannel->MarkIntercepted();
this change needs a comment. to be honest, I'm not the best reviewer for this change :/
::: netwerk/protocol/http/nsHttpChannel.cpp
@@ +3939,5 @@
>
> RefPtr<InterceptedChannelChrome> intercepted =
> new InterceptedChannelChrome(this, controller, entry);
> intercepted->NotifyController();
> + mInterceptedChannel = intercepted;
a blank line before this one please.
@@ +8652,5 @@
> void
> nsHttpChannel::MarkIntercepted()
> {
> mInterceptCache = INTERCEPTED;
> + mInterceptedChannel = nullptr;
should you also release it in ReleaseListeners()? also note that nsHttpChannel can be released (the dtor called) on a different than main thread - hence, if you need to keep the channel referenced until that,make sure you release on the right thread (there is a simple to use mechanism to release on main thread even when nsHttpChannel is released off the main thread). Although, ReleaseListeners is guarantied to be called on the main thread.
Attachment #8903477 -
Flags: review?(honzab.moz) → review+
Updated•7 years ago
|
Whiteboard: [necko-active]
Comment 3•7 years ago
|
||
Bulk priority update: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P1
Comment 4•7 years ago
|
||
Hard for me to know how much to prioritize this---not calling OnStop sounds bad enough (and we have a r+-ish patch) so I'm leaving at P1 for now.
Baku--can you make the tweaks in comment 2 and land this in the 57 time frame? If not, maybe you can answer the questions and we can find someone to write the patch.
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 5•7 years ago
|
||
Actually, this is not a priority at the moment and I don't want to land it yet: it was needed because of bug 1394102 but I bkelly decided that we don't need that bug (and this one) for 57.
Flags: needinfo?(amarchesini)
Priority: P1 → P2
Comment 6•7 years ago
|
||
Can you try this again? I recently landed code moves interception out of nsHttpChannel into a separate InterceptedHttpChannel class in bug 1391693. I believe canceling it should fire OnStopRequest().
I'm doing further improvement in this area in bug 1204254.
Depends on: 1391693
Flags: needinfo?(amarchesini)
Comment 7•6 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:baku, could you have a look please?
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 8•6 years ago
|
||
Asuth, do we need this bug somehow? I'm not following the ServiceWorker development closely and maybe this code is not needed anymore.
Flags: needinfo?(bugmail)
Flags: needinfo?(amarchesini)
Comment 9•6 years ago
|
||
Probably not? I would expect bug 1391693 and bug 1416879 to have addressed this. If they didn't the fix has definitely changed, and with parent intercept happening imminently, it's probably not worth the effort to address this further. Going to resolve this WFM for now and if we need to revisit for bug 1394102 or a related thing, we'll do it there/elsewhere.
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(bugmail)
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•