Open Bug 1501055 Opened 6 years ago Updated 2 years ago

Remove arbitrary ordering of WebSocketChannel::OnStartRequest and WebSocketChannel::OnTransportAvailable

Categories

(Core :: Networking: WebSockets, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: u408661, Unassigned)

Details

(Whiteboard: [necko-triaged])

So far as I can tell, ever since day 1 of websockets in necko, the code has assumed that OnStartRequest and OnTransportAvailable may come in any order. Also so far as I can tell, that is not the case (if indeed it ever was). WebSocketChannel::OnTransportAvailable is only ever called (indirectly) from nsHttpChannel::OnStopRequest, while WebSocketChannel::OnStartRequest is triggered from nsHttpChannel::OnStartRequest. Since we have guarantees that OnStartRequest must precede OnStopRequest, it seems reasonable to assume that WebSocketChannel::OnStartRequest will precede WebSocketChannel::OnTransportAvailable. So, let's do the following: (1) Remove code that assumes an arbitrary ordering of OnStartRequest and OnTransportAvailable (2) Add some assertions to ensure OnStartRequest precedes OnTransportAvailable (in case I've missed anything)
Assignee: u408661 → nobody

hey [:valentin]!
Can I work on this ?
and could you tell which files needs modification for this .
Thanks :)

It's not clear to me if we still need this. Michal, do you know?

Flags: needinfo?(michal.novotny)
Flags: needinfo?(michal.novotny)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.