Closed Bug 793364 Opened 12 years ago Closed 8 months ago

Make TCPSockets work with nsILoadGroups

Categories

(Core :: DOM: Networking, defect, P5)

defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: sicking, Unassigned)

References

Details

(Whiteboard: [domcore-bugbash-triaged])

This bug is filed in response to bug 793106 comment 5, so it's somewhat speculative. If it's wrong, please do close it. When using the TCPSocket API to open a connection, we should make sure that it is added to the appropriate nsILoadGroup. That both means that if the loadgroup is cancelled we should close the TCPSocket, and as long as the TCPSocket is open, we should keep the .activeCount on the loadgroup up by one.
Is there currently anything ensuring that a TCPSocket is closed if the app navigates away from the page owning the TCPSocket? If not this might be a blocker.
(In reply to Jonas Sicking (:sicking) from comment #1) > Is there currently anything ensuring that a TCPSocket is closed if the app > navigates away from the page owning the TCPSocket? If not this might be a > blocker. It listens for inner-window destroyed: http://mxr.mozilla.org/mozilla-central/source/dom/network/src/TCPSocket.js#280
That might not happen when the user leaves the page though, if the page is put in bfcache.
(In reply to Jonas Sicking (:sicking) from comment #3) > That might not happen when the user leaves the page though, if the page is > put in bfcache. I don't think the e-mail app will actually have its docshell navigated anyplace else, so for blocker purposes, this may not matter then since termination of the e-mail app should happen either by its owning iframe being removed or its process crashing. It does sound like it could matter if run in Firefox, assuming bfcache semantics are to suspend JS execution. In that case, depending on how the suspension happens, I might guess that incoming data could either be processed (if it's just the window that stops inbound events) or dropped on the floor (if the whole compartment changes to just throw when things are invoked in it).
(In reply to Andrew Sutherland (:asuth) from comment #4) > assuming bfcache semantics are to suspend JS execution. they are > In that case, depending on how the suspension happens, I might guess that > incoming data could either be processed (if it's just the window that stops > inbound events) this is the case
load group support should be relatively simple - basically you need to implement the nsIRequest interface and add yourself to the load group when the connection starts, and remove yourself from it when the connection is finished. implementing suspend/resume is optional but make sure you throw if you don't implement it.
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
Severity: normal → S3

[domcore-bugbash-triaged] Doing domcore random bug triage - won't fix.

Status: NEW → RESOLVED
Closed: 8 months ago
Component: DOM: Core & HTML → DOM: Networking
Resolution: --- → WONTFIX
Whiteboard: [domcore-bugbash-triaged]
You need to log in before you can comment on or make changes to this bug.