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

Issue 1414483010: Dart: Use a RawReceivePort to receive events for Mojo handles. (Closed)

Created:
5 years, 1 month ago by zra
Modified:
5 years, 1 month ago
Reviewers:
Cutch
CC:
mojo-reviews_chromium.org, gregsimon, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org, yzshen+mojopublicwatch_chromium.org
Base URL:
git@github.com:domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Dart: Use a RawReceivePort to receive events for Mojo handles. This makes MojoEventStream more of an event handler, and MojoEventStreamListener more of the controller of the event handler, so I've changed the names accordingly. Since handlers on RawReceivePorts don't throw exceptions into the current Zone, but rather into the root Zone, errors thrown by event handlers are now propagated to the event controller's onError function rather than relying on clients using Zones. This change has a noticible improvement in startup time due to avoiding compiling Stream related functions. ~130ms -> ~120ms on my machine, and so hopeuflly ~150ms -> 130-140ms on the perf bot. BUG= R=johnmccutchan@google.com Committed: https://chromium.googlesource.com/external/mojo/+/ca0cdfd1e380ab79c68c280bbd7ff6ae4ad1b6e5

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Merge fix #

Patch Set 4 : Merge fix #

Patch Set 5 : Merge #

Total comments: 12

Patch Set 6 : Address comments #

Patch Set 7 : Format #

Total comments: 10

Patch Set 8 : Fix comment, rename function #

Total comments: 6

Patch Set 9 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+235 lines, -436 lines) Patch
M benchmarks/mojo_rtt_benchmark/lib/echo_server.dart View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M benchmarks/mojo_rtt_benchmark/lib/isolate.dart View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M benchmarks/mojo_rtt_benchmark/lib/main.dart View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M examples/dart/netcat/lib/main.dart View 1 2 3 4 5 6 7 chunks +34 lines, -24 lines 0 comments Download
M mojo/dart/embedder/io/socket_patch.dart View 1 2 3 4 5 6 7 8 4 chunks +17 lines, -53 lines 0 comments Download
M mojo/dart/embedder/test/run_dart_tests.cc View 1 1 chunk +0 lines, -4 lines 0 comments Download
M mojo/dart/test/bindings_generation_test.dart View 1 2 3 4 5 6 10 chunks +19 lines, -31 lines 0 comments Download
M mojo/dart/test/compile_all_interfaces_test.dart View 1 chunk +3 lines, -3 lines 0 comments Download
M mojo/dart/test/handle_finalizer_test.dart View 1 2 3 4 5 6 7 1 chunk +4 lines, -4 lines 0 comments Download
D mojo/dart/test/handle_watcher_test.dart View 1 chunk +0 lines, -142 lines 0 comments Download
M mojo/dart/test/ping_pong_test.dart View 1 2 3 4 5 2 chunks +10 lines, -10 lines 0 comments Download
M mojo/dart/test/simple_handle_watcher_test.dart View 1 2 3 4 5 1 chunk +6 lines, -6 lines 0 comments Download
M mojo/dart/test/validation_test.dart View 1 2 3 4 5 6 5 chunks +19 lines, -11 lines 0 comments Download
M mojo/public/dart/mojo/lib/src/application.dart View 2 chunks +4 lines, -4 lines 0 comments Download
M mojo/public/dart/mojo/lib/src/application_connection.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M mojo/public/dart/mojo/lib/src/codec.dart View 1 2 3 4 5 6 7 4 chunks +5 lines, -6 lines 0 comments Download
M mojo/public/dart/mojo/lib/src/drain_data.dart View 1 2 3 4 5 6 3 chunks +13 lines, -13 lines 0 comments Download
M mojo/public/dart/mojo/lib/src/event_stream.dart View 1 2 3 4 5 6 7 8 6 chunks +71 lines, -92 lines 0 comments Download
M mojo/public/dart/mojo/lib/src/fill_data.dart View 1 2 3 4 5 6 2 chunks +9 lines, -12 lines 0 comments Download
M mojo/public/dart/mojo/lib/src/handle.dart View 1 2 3 4 5 6 2 chunks +2 lines, -3 lines 0 comments Download
M mojo/public/dart/mojo/lib/src/proxy.dart View 1 2 3 4 5 6 7 3 chunks +4 lines, -5 lines 0 comments Download
M mojo/public/dart/mojo/lib/src/stub.dart View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M services/dart/test/echo/lib/main.dart View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M services/dart/test/pingpong/lib/main.dart View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M services/dart/test/pingpong_target/lib/main.dart View 1 2 3 4 5 6 2 chunks +5 lines, -3 lines 0 comments Download

Messages

Total messages: 10 (1 generated)
zra
5 years, 1 month ago (2015-11-04 21:21:09 UTC) #2
zra
ping
5 years, 1 month ago (2015-11-11 16:03:44 UTC) #3
Cutch
https://codereview.chromium.org/1414483010/diff/80001/mojo/dart/embedder/io/socket_patch.dart File mojo/dart/embedder/io/socket_patch.dart (left): https://codereview.chromium.org/1414483010/diff/80001/mojo/dart/embedder/io/socket_patch.dart#oldcode345 mojo/dart/embedder/io/socket_patch.dart:345: onDone: _onOutputDone); Who calls _onOutputError and _onOutputDone now? https://codereview.chromium.org/1414483010/diff/80001/mojo/dart/test/validation_test.dart ...
5 years, 1 month ago (2015-11-11 17:47:17 UTC) #4
zra
https://codereview.chromium.org/1414483010/diff/80001/mojo/dart/embedder/io/socket_patch.dart File mojo/dart/embedder/io/socket_patch.dart (left): https://codereview.chromium.org/1414483010/diff/80001/mojo/dart/embedder/io/socket_patch.dart#oldcode345 mojo/dart/embedder/io/socket_patch.dart:345: onDone: _onOutputDone); On 2015/11/11 17:47:17, Cutch wrote: > Who ...
5 years, 1 month ago (2015-11-11 18:44:33 UTC) #5
Cutch
https://codereview.chromium.org/1414483010/diff/120001/mojo/dart/test/handle_finalizer_test.dart File mojo/dart/test/handle_finalizer_test.dart (right): https://codereview.chromium.org/1414483010/diff/120001/mojo/dart/test/handle_finalizer_test.dart#newcode20 mojo/dart/test/handle_finalizer_test.dart:20: // After making a MojoEventHandler, the underlying mojo handle ...
5 years, 1 month ago (2015-11-11 19:08:16 UTC) #6
zra
https://codereview.chromium.org/1414483010/diff/120001/mojo/dart/test/handle_finalizer_test.dart File mojo/dart/test/handle_finalizer_test.dart (right): https://codereview.chromium.org/1414483010/diff/120001/mojo/dart/test/handle_finalizer_test.dart#newcode20 mojo/dart/test/handle_finalizer_test.dart:20: // After making a MojoEventHandler, the underlying mojo handle ...
5 years, 1 month ago (2015-11-11 20:43:26 UTC) #7
Cutch
LGTM with some nits https://codereview.chromium.org/1414483010/diff/140001/mojo/dart/embedder/io/socket_patch.dart File mojo/dart/embedder/io/socket_patch.dart (right): https://codereview.chromium.org/1414483010/diff/140001/mojo/dart/embedder/io/socket_patch.dart#newcode470 mojo/dart/embedder/io/socket_patch.dart:470: MojoHandleSignals.READABLE); formatting https://codereview.chromium.org/1414483010/diff/140001/mojo/dart/embedder/io/socket_patch.dart#newcode478 mojo/dart/embedder/io/socket_patch.dart:478: MojoHandleSignals.WRITABLE); ...
5 years, 1 month ago (2015-11-11 20:57:56 UTC) #8
zra
Thanks! https://codereview.chromium.org/1414483010/diff/140001/mojo/dart/embedder/io/socket_patch.dart File mojo/dart/embedder/io/socket_patch.dart (right): https://codereview.chromium.org/1414483010/diff/140001/mojo/dart/embedder/io/socket_patch.dart#newcode470 mojo/dart/embedder/io/socket_patch.dart:470: MojoHandleSignals.READABLE); On 2015/11/11 20:57:55, Cutch wrote: > formatting ...
5 years, 1 month ago (2015-11-11 21:51:41 UTC) #9
zra
5 years, 1 month ago (2015-11-11 21:56:34 UTC) #10
Message was sent while issue was closed.
Committed patchset #9 (id:160001) manually as
ca0cdfd1e380ab79c68c280bbd7ff6ae4ad1b6e5 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698