[socket process] Consider using ChannelEventQueue in HttpTransactionParent
Categories
(Core :: Networking, defect, P2)
Tracking
()
People
(Reporter: kershaw, Assigned: kershaw)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
HttpTransactionParent which plays the same role as nsInputStreamPump in parent process should comply with the stream listener contract totally.
Currently, we have some code in HttpTransactionParent that tries to make HttpTransactionParent acts like nsInputStreamPump. Maybe the best way is try to reuse the code in [1].
Assignee | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Could we just have an implementation of nsIAsyncInputStream that crosses IPC (an inter-process pipe, actually) and let the pump simply live on the parent and deliver as it is?
Assignee | ||
Comment 2•5 years ago
•
|
||
(In reply to Honza Bambas (:mayhemer) from comment #1)
Could we just have an implementation of nsIAsyncInputStream that crosses IPC (an inter-process pipe, actually) and let the pump simply live on the parent and deliver as it is?
I think this might be a good idea, since the code in HttpTransactionParent right now is a bit mess.
But using an IPC pipe to deliver data would break the way we used to send ODA to child process.
Assignee | ||
Comment 3•5 years ago
|
||
After some investigation, I believe that we should use ChannelEventQueue in HttpTransactionParent.
Here are the reasons:
- It's hard to reuse the code in nsInputStreamPump, since OnStartRequest/ODA/OnStopRequest are delivered as IPC messages.
- Bug 1544777 introduced an ugly hack for dealing with the re-entrancy issue caused by sync XHR. ChannelEventQueue is actually designed for this purpose [1].
- ChannelEventQueue has it's own suspend counter, so we don't have to implement it again (See bug 1497270).
- We can implement nsIThreadRetargetableRequest by leveraging ChannelEventQueue.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 4•5 years ago
|
||
Comment 5•5 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:kershaw, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 6•5 years ago
|
||
Description
•