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

Issue 1585493002: [mojo] Ports EDK (Closed)

Created:
4 years, 11 months ago by Ken Rockot(use gerrit already)
Modified:
4 years, 11 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[mojo] Ports EDK One Big CL to land the new EDK implementation based on Ports. BUG=577688 Committed: https://crrev.com/ce69a049f1b705b0bb3d7e61d31908dfc8d968b2 Cr-Commit-Position: refs/heads/master@{#371556}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Patch Set 14 : #

Patch Set 15 : #

Patch Set 16 : #

Patch Set 17 : #

Patch Set 18 : unit tests #

Patch Set 19 : #

Patch Set 20 : add IO task runner to net_unittests #

Patch Set 21 : fix single-process mode #

Patch Set 22 : #

Patch Set 23 : #

Total comments: 10
Unified diffs Side-by-side diffs Delta from patch set Stats (+11358 lines, -5120 lines) Patch
M chrome/test/base/run_all_unittests.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +5 lines, -0 lines 0 comments Download
M components/test/run_all_unittests.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/mojo/mojo_application_host.h View 1 2 3 4 5 6 7 8 9 3 chunks +6 lines, -0 lines 0 comments Download
M content/browser/mojo/mojo_application_host.cc View 1 2 3 4 5 6 7 8 9 3 chunks +15 lines, -10 lines 0 comments Download
M content/child/child_thread_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +9 lines, -5 lines 0 comments Download
M content/child/mojo/mojo_application.h View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -2 lines 0 comments Download
M content/child/mojo/mojo_application.cc View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -5 lines 0 comments Download
M content/common/mojo/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M content/common/mojo/channel_init.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +12 lines, -4 lines 0 comments Download
M content/common/mojo/channel_init.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +44 lines, -9 lines 0 comments Download
M mojo/edk/embedder/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M mojo/edk/embedder/embedder.h View 1 2 3 4 5 6 7 8 9 10 11 20 21 2 chunks +45 lines, -1 line 1 comment Download
M mojo/edk/embedder/embedder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +80 lines, -88 lines 0 comments Download
M mojo/edk/embedder/embedder_unittest.cc View 1 2 3 4 5 6 7 8 7 chunks +91 lines, -384 lines 0 comments Download
M mojo/edk/embedder/platform_channel_pair_posix.cc View 1 chunk +0 lines, -8 lines 1 comment Download
M mojo/edk/embedder/platform_channel_utils_posix.cc View 4 5 6 1 chunk +0 lines, -8 lines 0 comments Download
M mojo/edk/embedder/test_embedder.cc View 2 chunks +5 lines, -15 lines 0 comments Download
M mojo/edk/system/BUILD.gn View 1 2 3 4 4 chunks +17 lines, -31 lines 0 comments Download
A mojo/edk/system/channel.h View 1 2 3 4 1 chunk +179 lines, -0 lines 1 comment Download
A mojo/edk/system/channel.cc View 1 2 3 4 1 chunk +339 lines, -0 lines 0 comments Download
A mojo/edk/system/channel_posix.cc View 1 2 3 4 5 6 7 1 chunk +347 lines, -0 lines 0 comments Download
A mojo/edk/system/channel_win.cc View 1 2 3 4 1 chunk +306 lines, -0 lines 0 comments Download
M mojo/edk/system/core.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +82 lines, -35 lines 0 comments Download
M mojo/edk/system/core.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 9 chunks +272 lines, -259 lines 0 comments Download
M mojo/edk/system/core_test_base.h View 3 chunks +0 lines, -3 lines 0 comments Download
M mojo/edk/system/core_test_base.cc View 5 chunks +40 lines, -77 lines 0 comments Download
M mojo/edk/system/core_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +0 lines, -8 lines 0 comments Download
M mojo/edk/system/data_pipe_consumer_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +82 lines, -84 lines 0 comments Download
M mojo/edk/system/data_pipe_consumer_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +361 lines, -330 lines 0 comments Download
A mojo/edk/system/data_pipe_control_message.h View 1 2 3 1 chunk +43 lines, -0 lines 0 comments Download
A mojo/edk/system/data_pipe_control_message.cc View 1 2 3 4 1 chunk +35 lines, -0 lines 0 comments Download
M mojo/edk/system/data_pipe_producer_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +84 lines, -78 lines 0 comments Download
M mojo/edk/system/data_pipe_producer_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +363 lines, -261 lines 0 comments Download
M mojo/edk/system/data_pipe_unittest.cc View 1 2 3 4 5 6 7 8 9 8 chunks +165 lines, -159 lines 0 comments Download
M mojo/edk/system/dispatcher.h View 1 2 3 4 3 chunks +150 lines, -334 lines 0 comments Download
M mojo/edk/system/dispatcher.cc View 1 2 3 4 3 chunks +94 lines, -463 lines 0 comments Download
M mojo/edk/system/handle_table.h View 1 2 3 1 chunk +33 lines, -105 lines 0 comments Download
M mojo/edk/system/handle_table.cc View 1 2 3 1 chunk +83 lines, -197 lines 0 comments Download
M mojo/edk/system/message_pipe_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +86 lines, -196 lines 0 comments Download
M mojo/edk/system/message_pipe_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +480 lines, -964 lines 0 comments Download
M mojo/edk/system/message_pipe_perftest.cc View 1 2 3 4 6 chunks +18 lines, -28 lines 0 comments Download
M mojo/edk/system/multiprocess_message_pipe_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 18 chunks +896 lines, -382 lines 0 comments Download
A mojo/edk/system/node_channel.h View 1 2 3 4 1 chunk +141 lines, -0 lines 0 comments Download
A mojo/edk/system/node_channel.cc View 1 2 3 4 1 chunk +417 lines, -0 lines 0 comments Download
A mojo/edk/system/node_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +280 lines, -0 lines 0 comments Download
A mojo/edk/system/node_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +771 lines, -0 lines 0 comments Download
M mojo/edk/system/platform_handle_dispatcher.h View 1 2 3 4 1 chunk +28 lines, -34 lines 0 comments Download
M mojo/edk/system/platform_handle_dispatcher.cc View 1 2 3 4 2 chunks +68 lines, -80 lines 0 comments Download
M mojo/edk/system/platform_handle_dispatcher_unittest.cc View 1 2 3 4 3 chunks +27 lines, -14 lines 0 comments Download
A mojo/edk/system/ports/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +44 lines, -0 lines 0 comments Download
A mojo/edk/system/ports/event.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +99 lines, -0 lines 0 comments Download
A mojo/edk/system/ports/hash_functions.h View 1 chunk +34 lines, -0 lines 1 comment Download
A mojo/edk/system/ports/message.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +91 lines, -0 lines 0 comments Download
A mojo/edk/system/ports/message.cc View 1 2 3 4 1 chunk +87 lines, -0 lines 0 comments Download
A mojo/edk/system/ports/message_queue.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +70 lines, -0 lines 0 comments Download
A mojo/edk/system/ports/message_queue.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +87 lines, -0 lines 0 comments Download
A mojo/edk/system/ports/name.h View 1 chunk +47 lines, -0 lines 0 comments Download
A mojo/edk/system/ports/name.cc View 1 chunk +22 lines, -0 lines 0 comments Download
A mojo/edk/system/ports/node.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +192 lines, -0 lines 0 comments Download
A mojo/edk/system/ports/node.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +998 lines, -0 lines 0 comments Download
A mojo/edk/system/ports/node_delegate.h View 1 2 3 4 1 chunk +45 lines, -0 lines 0 comments Download
A mojo/edk/system/ports/port.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +60 lines, -0 lines 0 comments Download
A mojo/edk/system/ports/port.cc View 1 chunk +24 lines, -0 lines 0 comments Download
A mojo/edk/system/ports/port_ref.h View 1 2 3 1 chunk +41 lines, -0 lines 0 comments Download
A mojo/edk/system/ports/port_ref.cc View 1 2 3 1 chunk +37 lines, -0 lines 0 comments Download
A mojo/edk/system/ports/ports_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1074 lines, -0 lines 0 comments Download
A mojo/edk/system/ports/user_data.h View 1 2 3 1 chunk +25 lines, -0 lines 0 comments Download
A mojo/edk/system/ports_message.h View 1 2 3 4 1 chunk +59 lines, -0 lines 0 comments Download
A mojo/edk/system/ports_message.cc View 1 2 3 4 1 chunk +60 lines, -0 lines 0 comments Download
A mojo/edk/system/remote_message_pipe_bootstrap.h View 1 2 3 4 5 6 7 8 9 1 chunk +76 lines, -0 lines 0 comments Download
A mojo/edk/system/remote_message_pipe_bootstrap.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +189 lines, -0 lines 0 comments Download
M mojo/edk/system/shared_buffer_dispatcher.h View 1 2 3 4 3 chunks +42 lines, -34 lines 1 comment Download
M mojo/edk/system/shared_buffer_dispatcher.cc View 1 2 3 4 6 chunks +104 lines, -103 lines 1 comment Download
A mojo/edk/system/shared_buffer_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +160 lines, -0 lines 0 comments Download
M mojo/edk/system/wait_set_dispatcher.h View 1 2 3 4 chunks +30 lines, -27 lines 1 comment Download
M mojo/edk/system/wait_set_dispatcher.cc View 1 2 3 5 chunks +64 lines, -56 lines 3 comments Download
M mojo/edk/system/wait_set_dispatcher_unittest.cc View 5 chunks +13 lines, -9 lines 0 comments Download
M mojo/edk/test/BUILD.gn View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A mojo/edk/test/mojo_test_base.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +240 lines, -0 lines 0 comments Download
A mojo/edk/test/mojo_test_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +220 lines, -0 lines 0 comments Download
M mojo/edk/test/multiprocess_test_helper.h View 1 2 3 4 5 6 7 8 9 3 chunks +16 lines, -41 lines 0 comments Download
M mojo/edk/test/multiprocess_test_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +86 lines, -31 lines 0 comments Download
M mojo/edk/test/run_all_perftests.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M mojo/edk/test/run_all_unittests.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M mojo/mojo_edk.gyp View 1 2 3 4 5 6 7 8 9 10 4 chunks +33 lines, -24 lines 0 comments Download
M mojo/mojo_edk_tests.gyp View 1 2 3 4 5 3 chunks +15 lines, -7 lines 0 comments Download
M mojo/shell/runner/host/child_process.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +37 lines, -40 lines 0 comments Download
M mojo/shell/runner/host/child_process_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +63 lines, -10 lines 0 comments Download
M mojo/shell/runner/host/child_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +104 lines, -36 lines 0 comments Download
M mojo/shell/runner/host/child_process_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +16 lines, -22 lines 0 comments Download
M mojo/shell/runner/host/out_of_process_native_runner.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +6 lines, -0 lines 0 comments Download
M mojo/shell/runner/host/out_of_process_native_runner.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +16 lines, -7 lines 0 comments Download
M mojo/shell/runner/host/switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M mojo/shell/runner/host/switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M net/test/run_all_unittests.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 20 21 2 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (6 generated)
Ken Rockot(use gerrit already)
Anand, did you want to do a review pass?
4 years, 11 months ago (2016-01-25 23:57:35 UTC) #3
jam
lgtm (per offline discussion, Anand can review in detail after landing since this code was ...
4 years, 11 months ago (2016-01-26 18:00:10 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1585493002/440001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1585493002/440001
4 years, 11 months ago (2016-01-26 18:04:27 UTC) #7
commit-bot: I haz the power
Committed patchset #23 (id:440001)
4 years, 11 months ago (2016-01-26 19:23:32 UTC) #8
commit-bot: I haz the power
Patchset 23 (id:??) landed as https://crrev.com/ce69a049f1b705b0bb3d7e61d31908dfc8d968b2 Cr-Commit-Position: refs/heads/master@{#371556}
4 years, 11 months ago (2016-01-26 19:24:22 UTC) #10
Nico
..\..\mojo\edk\system\channel_win.cc(27,14) : error: unused variable 'kMaxBatchReadCapacity' [-Werror,-Wunused-const-variable] const size_t kMaxBatchReadCapacity = 256 * 1024; ^ ...
4 years, 11 months ago (2016-01-26 23:04:44 UTC) #12
Ken Rockot(use gerrit already)
Yes, taking a look. On Tue, Jan 26, 2016 at 3:04 PM, <thakis@chromium.org> wrote: > ...
4 years, 11 months ago (2016-01-26 23:05:46 UTC) #13
Ken Rockot(use gerrit already)
Also, that should be the only one. It's the only Windows-only code in the CL. ...
4 years, 11 months ago (2016-01-26 23:06:52 UTC) #14
Anand Mistry (off Chromium)
4 years, 11 months ago (2016-01-28 02:26:25 UTC) #15
Message was sent while issue was closed.
I started reviewing this, but the change is just too big (~16,000 delta lines)
to review effectively. So, I'm just going to dig in to the implementation and
start making changes where I think there are issues.

https://codereview.chromium.org/1585493002/diff/440001/mojo/edk/embedder/embe...
File mojo/edk/embedder/embedder.h (right):

https://codereview.chromium.org/1585493002/diff/440001/mojo/edk/embedder/embe...
mojo/edk/embedder/embedder.h:13: #include "base/command_line.h"
You don't use base::CommandLine anywhere in this file, so it shouldn't be here.
IWYU!

https://codereview.chromium.org/1585493002/diff/440001/mojo/edk/embedder/plat...
File mojo/edk/embedder/platform_channel_pair_posix.cc (right):

https://codereview.chromium.org/1585493002/diff/440001/mojo/edk/embedder/plat...
mojo/edk/embedder/platform_channel_pair_posix.cc:19: #include "base/rand_util.h"
You can remove since there are no other uses of base::Rand* in here.

https://codereview.chromium.org/1585493002/diff/440001/mojo/edk/system/channel.h
File mojo/edk/system/channel.h (right):

https://codereview.chromium.org/1585493002/diff/440001/mojo/edk/system/channe...
mojo/edk/system/channel.h:117: void ShutDown();
It's not clear which threads these can be called on. If it's the IO thread,
please document and add a thread checker. If it's any thread, also document, but
I'm concerned there are data races here.

https://codereview.chromium.org/1585493002/diff/440001/mojo/edk/system/ports/...
File mojo/edk/system/ports/hash_functions.h (right):

https://codereview.chromium.org/1585493002/diff/440001/mojo/edk/system/ports/...
mojo/edk/system/ports/hash_functions.h:17: size_t h1 =
hash<uint64_t>()(name.v1);
Since avoid //base doesn't appear to be a goal for ports, please use
base::HashInts.

https://codereview.chromium.org/1585493002/diff/440001/mojo/edk/system/shared...
File mojo/edk/system/shared_buffer_dispatcher.cc (right):

https://codereview.chromium.org/1585493002/diff/440001/mojo/edk/system/shared...
mojo/edk/system/shared_buffer_dispatcher.cc:27: size_t num_bytes;
Please don't use size_t in serialised messages.

https://codereview.chromium.org/1585493002/diff/440001/mojo/edk/system/shared...
File mojo/edk/system/shared_buffer_dispatcher.h (right):

https://codereview.chromium.org/1585493002/diff/440001/mojo/edk/system/shared...
mojo/edk/system/shared_buffer_dispatcher.h:108: ScopedPlatformHandle
handle_for_transit_;
Instead of keeping track, why not just pass ownership of the duplicated handle
and let the caller discard it if something goes wrong?

https://codereview.chromium.org/1585493002/diff/440001/mojo/edk/system/wait_s...
File mojo/edk/system/wait_set_dispatcher.cc (right):

https://codereview.chromium.org/1585493002/diff/440001/mojo/edk/system/wait_s...
mojo/edk/system/wait_set_dispatcher.cc:48: base::AutoLock lock(lock_);
Why not just hold lock_ for the entire function. It's difficult to reason, but
this code was written under that assumption, so there might be races now.

https://codereview.chromium.org/1585493002/diff/440001/mojo/edk/system/wait_s...
mojo/edk/system/wait_set_dispatcher.cc:115: base::AutoLock lock(lock_);
Need to handle the closed state. This can return "not found" when the wait set
is being closed, which isn't right.

https://codereview.chromium.org/1585493002/diff/440001/mojo/edk/system/wait_s...
mojo/edk/system/wait_set_dispatcher.cc:225: HandleSignalsState
WaitSetDispatcher::GetHandleSignalsState() const {
Need to handle the closed state. Without it, it's possible to add an awakable to
a closed wait set.

https://codereview.chromium.org/1585493002/diff/440001/mojo/edk/system/wait_s...
File mojo/edk/system/wait_set_dispatcher.h (right):

https://codereview.chromium.org/1585493002/diff/440001/mojo/edk/system/wait_s...
mojo/edk/system/wait_set_dispatcher.h:68: // Guards |is_closed_|,
|waiting_dispatchers_|, and |waiter_|.
nit: not |waiter_|, which doesn't need locking.

Powered by Google App Engine
This is Rietveld 408576698