Chromium Code Reviews
DescriptionMojo C++ bindings: fix MultiplexRouter and ChannelAssociatedGroupController.
- There were a few places where a local ScopedInterfaceEndpointHandle was
created for an endpoint but the handle_created field wasn't updated.
- Previously there was a race: when processing a message, the router's lock was
released to create local ScopedInterfaceEndpointHandles for the transferred
interface IDs. (Let's say it was going to register endpoint x.) At the same
time, another thread could acquire the lock to process subsequent messages. It
might find that a message targeted endpoint x but x was not registered. The
previous code inserted endpoint x in this case. MultiplexRouter also marked
the newly-inserted endpoint as CLOSED, which avoided blocking processing
subsequent messages, but was wrong in this case.
With this CL, endpoints are registered as soon as incoming messages arrives.
It fixes the race and also simplifies IncomingMessageWrapper.
BUG=682334
Review-Url: https://codereview.chromium.org/2674483002
Cr-Commit-Position: refs/heads/master@{#447701}
Committed: https://chromium.googlesource.com/chromium/src/+/0a597131aec73063576b26e6caabde99b09ec890
Patch Set 1 #Patch Set 2 : . #
Dependent Patchsets: Messages
Total messages: 15 (11 generated)
|
|||||||||||||||||||||||||||||||||||||