Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Issue 2674483002: Mojo C++ bindings: fix MultiplexRouter and ChannelAssociatedGroupController. (Closed)

Created:
3 years, 10 months ago by yzshen1
Modified:
3 years, 10 months ago
CC:
Aaron Boodman, abarth-chromium, chromium-reviews, darin (slow to review), darin-cc_chromium.org, jam, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mojo 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 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -182 lines) Patch
M ipc/ipc_mojo_bootstrap.cc View 1 15 chunks +59 lines, -89 lines 0 comments Download
M mojo/public/cpp/bindings/lib/multiplex_router.h View 3 chunks +3 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/lib/multiplex_router.cc View 1 11 chunks +53 lines, -91 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 15 (11 generated)
yzshen1
Hi, Ken. Would you please take a look? Thanks!
3 years, 10 months ago (2017-02-01 23:07:19 UTC) #7
Ken Rockot(use gerrit already)
lgtm
3 years, 10 months ago (2017-02-02 01:50:19 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2674483002/20001
3 years, 10 months ago (2017-02-02 03:26:30 UTC) #12
commit-bot: I haz the power
3 years, 10 months ago (2017-02-02 05:14:24 UTC) #15
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/0a597131aec73063576b26e6caab...

Powered by Google App Engine
This is Rietveld 408576698