Bug 1633935 Comment 5 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

P2 still needs some investigation (at least more comment) but I'd like to leave some note here:

https://searchfox.org/mozilla-central/rev/dc4560dcaafd79375b9411fdbbaaebb0a59a93ac/netwerk/protocol/http/HttpChannelChild.cpp#432-436
```
    // Child's mEventQ is to control the execution order of the IPC messages
    // from both main thread IPDL and PBackground IPDL.
    // To guarantee the ordering, PBackground IPC messages that are sent after
    // OnStartRequest will be throttled until OnStartRequest hits the Child's
    // mEventQ.
```
This is not true if OnStartRequest is sent thru pBG if RetargetDeliveryTo is called in OnStartRequest
(1) [socket thread] HttpBgChannelChild::RecvOnStartRequest ==> OnStartRequest hits mEventQ
(2) [main thread] HttpChannelChild::OnStartRequest
(2-1) [main thread]   HttpChannelChild::RetargetDeliveryTo
(3) [socket thread] HttpBgChannelChild::RecvOnTransportAndData
(3-1) [socket thread] HttpChannelChild::ProcessOnTransportAndData

However, (3) could happen before (2-1) and  we might put the wrong ODAEvent to mQueue
https://searchfox.org/mozilla-central/rev/dc4560dcaafd79375b9411fdbbaaebb0a59a93ac/netwerk/protocol/http/HttpChannelChild.cpp#769-779

I know that the event target is getter lambda, but it seems that we do not guarantee to get the event target right as we dispatch the event.
P2 still needs some investigation (at least more comment) but I'd like to leave some note here:

https://searchfox.org/mozilla-central/rev/dc4560dcaafd79375b9411fdbbaaebb0a59a93ac/netwerk/protocol/http/HttpChannelChild.cpp#432-436
```
    // Child's mEventQ is to control the execution order of the IPC messages
    // from both main thread IPDL and PBackground IPDL.
    // To guarantee the ordering, PBackground IPC messages that are sent after
    // OnStartRequest will be throttled until OnStartRequest hits the Child's
    // mEventQ.
```
This is not true if OnStartRequest is sent thru pBG if RetargetDeliveryTo is called in OnStartRequest
(1) [socket thread] HttpBgChannelChild::RecvOnStartRequest ==> OnStartRequest hits mEventQ
(2) [main thread] HttpChannelChild::OnStartRequest
(2-1) [main thread]   HttpChannelChild::RetargetDeliveryTo
(3) [socket thread] HttpBgChannelChild::RecvOnTransportAndData
(3-1) [socket thread] HttpChannelChild::ProcessOnTransportAndData

However, (3) could happen before (2-1) and  we might put the wrong ODAEvent to mQueue
https://searchfox.org/mozilla-central/rev/dc4560dcaafd79375b9411fdbbaaebb0a59a93ac/netwerk/protocol/http/HttpChannelChild.cpp#769-779

I know that the event target is getter lambda, but it seems that we do not guarantee to get the event target right as we dispatch the event.

Edit: the lambda works well. Please ignore this comment.

Back to Bug 1633935 Comment 5