Open Bug 759819 Opened 13 years ago Updated 1 year ago

Various necko objects not releasing nsIRequestObservers after OnStop

Categories

(Core :: Networking, defect, P2)

x86_64
Linux
defect

Tracking

()

mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: jduell.mcbugs, Unassigned)

References

Details

(Whiteboard: [necko-backlog][necko-priority-next])

Attachments

(1 file, 1 obsolete file)

Necko channels have a contract (see nsIChannel::asyncOpen) where they release their ref to the listener after the last callback is completed. But as I'm finding in bug 748766 comment 10, we've got channels hanging onto some listeners (in this case, WebsocketChannels) until they're destroyed. I'm doing a quick audit to see if there are other places in necko where we don't release after OnStop--another patch to follow (or maybe separate bug).
Attachment #628381 - Flags: review?(mcmanus)
> Necko channels have a contract (see nsIChannel::asyncOpen) where they > release their ref to the listener after the last callback is completed. I don't have a problem believing this - indeed I do! But I don't see that clearly spelled out in nsIChannel as you indicate. Maybe we can make that explicit or am I missing it entirely?
Comment on attachment 628381 [details] [diff] [review] teach 3 necko classes to release listeners after OnStopRequest Review of attachment 628381 [details] [diff] [review]: ----------------------------------------------------------------- this is good research! ::: netwerk/base/public/nsStreamListenerWrapper.h @@ +25,5 @@ > > + // Don't use NS_FORWARD_NSIREQUESTOBSERVER(mListener->) here, because we need > + // to release mListener in OnStopRequest, and IDL-generated function doesn't. > + NS_SCRIPTABLE NS_IMETHOD OnStartRequest(nsIRequest *aRequest, > + nsISupports *aContext) "and *a* IDL-ge.." ?
Attachment #628381 - Flags: review?(mcmanus) → review+
Might be also related to bug 746255.
why is this r+ patch stalled?
Assignee: nobody → jduell.mcbugs
Flags: needinfo?(jduell.mcbugs)
Whiteboard: [necko-active]
Flags: needinfo?(jduell.mcbugs)
Attached patch v2: rebased. (deleted) — Splinter Review
Attachment #628381 - Attachment is obsolete: true
Attachment #8753080 - Flags: review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Depends on: 1274279
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Not sure when I'll get to this again, so freeing it back to the necko backlog. If someone wants to give it a try, I recommend applying only some of the patch and see which part is breaking things.
Assignee: jduell.mcbugs → nobody
Whiteboard: [necko-active] → [necko-backlog]
Priority: -- → P1
Priority: P1 → P3
Severity: normal → S3

As far as I can tell, this got backed out for regressing XPCOM extensions. We no longer have those, and it seems the issue outlined in this patch is still valid.

Status: REOPENED → NEW
Priority: P3 → P2
Whiteboard: [necko-backlog] → [necko-backlog][necko-priority-next]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: