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

Issue 2668153003: Mojo C++ Bindings: Eliminate unbound ThreadSafeInterfacePtr (Closed)

Created:
3 years, 10 months ago by Ken Rockot(use gerrit already)
Modified:
3 years, 10 months ago
Reviewers:
jam, yzshen1
CC:
Aaron Boodman, abarth-chromium, chromium-reviews, darin (slow to review), darin-cc_chromium.org, jam, mlamouri+watch-content_chromium.org, 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: Eliminiate unbound ThreadSafeInterfacePtr Changes ThreadSafeInterfacePtr such that it is no longer possible to create one which is unbound. Instead, it is now possible to create one which will imminently be bound on a specific TaskRunner but which is usable immediately. Also introduces ThreadSafeForwarder as a reduced encapsulation of thread-safe serialization and forwarding logic. This is used to implement ThreadSafeInterfacePtrBase, as well as to support immediate associated request forwarding on IPC::ChannelProxy in a thread-safe manner, where the underlying AssociatedInterfacePtr must remain owned by the channel's IPC::MessagePipeReader. Finally, in order to facilitate IPC::Channel exposing ipc.mojom types through its public interface, the //ipc:mojom target has been folded into //ipc's component exports. Any prior dependents on //ipc:mojom have been updated accordingly. BUG=682334 R=yzshen@chromium.org TEST=ipc_tests, mojo_public_bindings_unittests Review-Url: https://codereview.chromium.org/2668153003 Cr-Commit-Position: refs/heads/master@{#449239} Committed: https://chromium.googlesource.com/chromium/src/+/a628d0b45d5ce49a035020d8d67e9cc9a562ecac

Patch Set 1 #

Total comments: 1

Patch Set 2 : . #

Total comments: 23

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : . #

Patch Set 6 : format and rebase... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+384 lines, -361 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 2 chunks +5 lines, -1 line 0 comments Download
M chrome/utility/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chromecast/app/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M components/nacl/common/BUILD.gn View 1 1 chunk +0 lines, -1 line 0 comments Download
M content/app/BUILD.gn View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M content/browser/BUILD.gn View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M content/child/BUILD.gn View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M content/common/BUILD.gn View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M content/renderer/BUILD.gn View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
D content/renderer/mojo/thread_safe_associated_interface_ptr_provider.h View 1 chunk +0 lines, -57 lines 0 comments Download
M content/renderer/render_thread_impl.h View 1 2 3 4 5 2 chunks +0 lines, -3 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 2 chunks +2 lines, -6 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ipc/BUILD.gn View 1 3 chunks +4 lines, -2 lines 0 comments Download
M ipc/ipc_channel.h View 1 3 chunks +7 lines, -0 lines 0 comments Download
M ipc/ipc_channel_mojo.h View 1 5 chunks +10 lines, -6 lines 0 comments Download
M ipc/ipc_channel_mojo.cc View 1 2 3 4 5 3 chunks +42 lines, -17 lines 0 comments Download
M ipc/ipc_channel_proxy.h View 1 2 6 chunks +25 lines, -23 lines 0 comments Download
M ipc/ipc_channel_proxy.cc View 1 2 3 4 5 3 chunks +5 lines, -17 lines 0 comments Download
M ipc/ipc_message_pipe_reader.h View 1 1 chunk +1 line, -1 line 0 comments Download
M ipc/ipc_mojo_bootstrap.h View 1 2 chunks +2 lines, -10 lines 0 comments Download
M ipc/ipc_mojo_bootstrap.cc View 1 2 3 4 5 4 chunks +6 lines, -17 lines 0 comments Download
M ipc/ipc_mojo_bootstrap_unittest.cc View 1 2 3 4 5 3 chunks +51 lines, -31 lines 0 comments Download
M mojo/public/cpp/bindings/associated_interface_ptr.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/interface_ptr.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/tests/associated_interface_unittest.cc View 1 2 3 4 5 2 chunks +32 lines, -32 lines 0 comments Download
M mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc View 1 2 3 4 5 2 chunks +9 lines, -5 lines 0 comments Download
M mojo/public/cpp/bindings/thread_safe_interface_ptr.h View 1 2 3 4 5 2 chunks +162 lines, -126 lines 0 comments Download
M remoting/host/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M remoting/host/security_key/BUILD.gn View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M remoting/host/win/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 81 (65 generated)
Ken Rockot(use gerrit already)
3 years, 10 months ago (2017-02-01 18:44:19 UTC) #6
yzshen1
https://codereview.chromium.org/2668153003/diff/1/ipc/ipc_channel_proxy.h File ipc/ipc_channel_proxy.h (right): https://codereview.chromium.org/2668153003/diff/1/ipc/ipc_channel_proxy.h#newcode220 ipc/ipc_channel_proxy.h:220: void GetThreadSafeRemoteAssociatedInterface( I guess the change I proposed is ...
3 years, 10 months ago (2017-02-01 18:57:56 UTC) #7
Ken Rockot(use gerrit already)
I think this may be ready for review now. I've left GetThreadSafeRemoteAssociatedInterface in place as ...
3 years, 10 months ago (2017-02-06 22:43:20 UTC) #24
yzshen1
Mostly looks good. Just some nits. Thanks! https://codereview.chromium.org/2668153003/diff/80001/content/renderer/mojo/thread_safe_associated_interface_ptr_provider.h File content/renderer/mojo/thread_safe_associated_interface_ptr_provider.h (left): https://codereview.chromium.org/2668153003/diff/80001/content/renderer/mojo/thread_safe_associated_interface_ptr_provider.h#oldcode20 content/renderer/mojo/thread_safe_associated_interface_ptr_provider.h:20: class ThreadSafeAssociatedInterfacePtrProvider ...
3 years, 10 months ago (2017-02-07 00:06:27 UTC) #33
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2668153003/diff/80001/ipc/ipc_channel_proxy.h File ipc/ipc_channel_proxy.h (right): https://codereview.chromium.org/2668153003/diff/80001/ipc/ipc_channel_proxy.h#newcode227 ipc/ipc_channel_proxy.h:227: context()->thread_safe_channel().GetAssociatedInterface( On 2017/02/07 at 00:06:26, yzshen1 wrote: > nit: ...
3 years, 10 months ago (2017-02-07 01:25:32 UTC) #36
yzshen1
LGTM with one nit. Thanks! https://codereview.chromium.org/2668153003/diff/80001/ipc/ipc_channel_proxy.h File ipc/ipc_channel_proxy.h (right): https://codereview.chromium.org/2668153003/diff/80001/ipc/ipc_channel_proxy.h#newcode227 ipc/ipc_channel_proxy.h:227: context()->thread_safe_channel().GetAssociatedInterface( On 2017/02/07 01:25:32, ...
3 years, 10 months ago (2017-02-07 06:05:52 UTC) #39
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2668153003/diff/80001/ipc/ipc_channel_proxy.h File ipc/ipc_channel_proxy.h (right): https://codereview.chromium.org/2668153003/diff/80001/ipc/ipc_channel_proxy.h#newcode227 ipc/ipc_channel_proxy.h:227: context()->thread_safe_channel().GetAssociatedInterface( On 2017/02/07 at 06:05:52, yzshen1 wrote: > On ...
3 years, 10 months ago (2017-02-08 00:37:12 UTC) #41
Ken Rockot(use gerrit already)
+jam for content Note that the redness on try jobs all seems to be caused ...
3 years, 10 months ago (2017-02-08 06:12:57 UTC) #46
jam
lgtm
3 years, 10 months ago (2017-02-08 17:08:13 UTC) #47
Ken Rockot(use gerrit already)
OK - The red was ultimately caused by several targets in the tree missing a ...
3 years, 10 months ago (2017-02-09 00:49:44 UTC) #55
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/2668153003/180001
3 years, 10 months ago (2017-02-09 05:57:25 UTC) #65
commit-bot: I haz the power
Failed to apply patch for content/child/BUILD.gn: While running git apply --index -p1; error: patch failed: ...
3 years, 10 months ago (2017-02-09 06:34:37 UTC) #67
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/2668153003/180001
3 years, 10 months ago (2017-02-09 06:45:12 UTC) #69
commit-bot: I haz the power
Failed to apply patch for content/child/BUILD.gn: While running git apply --index -p1; error: patch failed: ...
3 years, 10 months ago (2017-02-09 06:49:34 UTC) #71
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/2668153003/200001
3 years, 10 months ago (2017-02-09 08:22:16 UTC) #78
commit-bot: I haz the power
3 years, 10 months ago (2017-02-09 08:41:09 UTC) #81
Message was sent while issue was closed.
Committed patchset #6 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/a628d0b45d5ce49a035020d8d67e...

Powered by Google App Engine
This is Rietveld 408576698