[socket-proc] Connection stickiness handling for upgrade observers

NEW
Unassigned

Status

()

enhancement
P2
normal
7 months ago
3 days ago

People

(Reporter: mayhemer, Unassigned)

Tracking

(Blocks 1 bug)

Trunk
Points:
---

Firefox Tracking Flags

(firefox64 affected)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 attachment)

(Reporter)

Comment 1

7 months ago
Priority and also implementation of this bug depends on how we are going to handle websocket upgrades.  This is related to listening sockets as well - how are we going to deal with it.

Updated

6 months ago
Priority: -- → P3
Whiteboard: [necko-triaged]

To complete websocket upgrade, it means that the ownership of socket transport should be transfered [1] to websocket channel.
I am not sure how to do this since parent process can't access the socket transport in socket process. Maybe we have to provide IPC version of nsISocketTransport, nsIAsyncInputStream and nsIAsyncOutputStream [2].

[1] https://searchfox.org/mozilla-central/rev/89414a1df52d06cfc35529afb9a5a8542a6e4270/netwerk/protocol/http/nsHttpConnectionMgr.cpp#2875-2885
[2] https://searchfox.org/mozilla-central/rev/89414a1df52d06cfc35529afb9a5a8542a6e4270/media/mtransport/ipc/WebrtcProxyChannel.cpp#289

Hi Michal,

Could you take a look at comment2? I think adding IPC interface for nsISocketTransport and nsIAsync(Input/Output)Stream might be too complicated. Could you provide your insight here?

Thanks.

Flags: needinfo?(michal.novotny)

(In reply to Kershaw Chang [:kershaw] from comment #3)

Hi Michal,

Could you take a look at comment2? I think adding IPC interface for nsISocketTransport and nsIAsync(Input/Output)Stream might be too complicated. Could you provide your insight here?

Thanks.

I'm not sure I understand the problem here because I'm not familiar with socket process changes. Websocket channel needs the socket to read/write data from/to it.

Flags: needinfo?(michal.novotny)

(In reply to Michal Novotny [:michal] from comment #4)

(In reply to Kershaw Chang [:kershaw] from comment #3)

Hi Michal,

Could you take a look at comment2? I think adding IPC interface for nsISocketTransport and nsIAsync(Input/Output)Stream might be too complicated. Could you provide your insight here?

Thanks.

I'm not sure I understand the problem here because I'm not familiar with socket process changes. Websocket channel needs the socket to read/write data from/to it.

Sorry that I didn't explain how socket process works first.

The current architecture is keeping http channel in parent process and others under http channel (e.g. http transaction and http connection) in socket process. The thing is that the socket transport that Websocket channel needs is only accessible in socket process.

A possible solution is to implement IPC interface for nsISocketTransport, nsIAsyncInputStream and nsIAsyncOutputStream, but it seems this is a bit too complicated.

(In reply to Kershaw Chang [:kershaw] from comment #5)

A possible solution is to implement IPC interface for nsISocketTransport, nsIAsyncInputStream and nsIAsyncOutputStream, but it seems this is a bit too complicated.

I guess the other possible solution is to separate socket manipulation from the WebSocketChannel and let it run in the socket process. I'm not sure what is less complicated. Also, the generic solution could be used by other code, not just websocket channel.

Should be done before landing back to central with pref off

Priority: P3 → P2

Simple patch for enable upgrade again. Only without socket process.

You need to log in before you can comment on or make changes to this bug.