|
Dart: Simplifies the handle watcher. Various cleanups and bugfixes.
This CL removes the TOGGLE_WRITE command from the Dart handle watcher.
The listen function in the MojoHandle class also no longer wraps
the callback in a closure that automatically adds the handle back to
the watcher after an event has been handled. This was trying to be too
clever. Instead, after handling an event, the callback must explicitly
indicate the events the client is now interested in. To enable this
approach, the handle watcher now also sends the set of signals that
were listened for to the client on an event.
Also:
- Interface implementation functions now return a Future so that e.g. a
request can be serviced by an Isolate or other async operation, and the
Interface can immediately return to listening for events on the pipe.
- Clients now set a meaningful request ID so that the right Completer for
the response can be looked up in a Map.
- Rewrites MojoHandleSignals.
- Renames MojoHandle to MojoEventStream and RawMojoHandle to MojoHandle.
BUG=
R=abarth@chromium.org, asiva@google.com
Committed: https://chromium.googlesource.com/external/mojo/+/6e3be6003da13efc3d7b68cb9dd10aadfc56c088
Total comments: 6
Total comments: 7
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+606 lines, -477 lines) |
Patch |
 |
M |
mojo/dart/embedder/BUILD.gn
|
View
|
1
2
3
4
5
6
|
2 chunks |
+18 lines, -1 line |
0 comments
|
Download
|
 |
M |
mojo/dart/embedder/test/BUILD.gn
|
View
|
1
2
3
4
5
6
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
mojo/dart/embedder/test/dart_to_cpp_tests.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
mojo/dart/embedder/test/dart_to_cpp_tests.dart
|
View
|
1
2
3
4
5
|
2 chunks |
+4 lines, -6 lines |
0 comments
|
Download
|
 |
M |
mojo/dart/test/bindings_generation_test.dart
|
View
|
1
2
3
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
mojo/dart/test/codec_test.dart
|
View
|
1
2
3
|
3 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
mojo/dart/test/core_test.dart
|
View
|
1
2
3
4
|
10 chunks |
+20 lines, -23 lines |
0 comments
|
Download
|
 |
M |
mojo/dart/test/handle_finalizer_test.dart
|
View
|
1
2
3
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
mojo/dart/test/handle_watcher_test.dart
|
View
|
1
2
3
|
4 chunks |
+29 lines, -27 lines |
0 comments
|
Download
|
 |
M |
mojo/dart/test/interface_test.dart
|
View
|
|
7 chunks |
+20 lines, -14 lines |
0 comments
|
Download
|
 |
M |
mojo/dart/test/ping_pong_test.dart
|
View
|
1
2
3
|
2 chunks |
+22 lines, -20 lines |
0 comments
|
Download
|
 |
M |
mojo/dart/test/simple_handle_watcher_test.dart
|
View
|
1
2
3
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
mojo/public/dart/src/buffer.dart
|
View
|
1
2
3
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
mojo/public/dart/src/client.dart
|
View
|
1
2
3
|
3 chunks |
+90 lines, -52 lines |
0 comments
|
Download
|
 |
M |
mojo/public/dart/src/codec.dart
|
View
|
1
2
3
|
7 chunks |
+25 lines, -21 lines |
0 comments
|
Download
|
 |
M |
mojo/public/dart/src/data_pipe.dart
|
View
|
1
2
3
|
5 chunks |
+10 lines, -8 lines |
0 comments
|
Download
|
 |
M |
mojo/public/dart/src/handle.dart
|
View
|
1
2
3
4
|
7 chunks |
+59 lines, -92 lines |
0 comments
|
Download
|
 |
M |
mojo/public/dart/src/handle_watcher.dart
|
View
|
1
2
3
4
5
6
7
|
12 chunks |
+92 lines, -88 lines |
0 comments
|
Download
|
 |
M |
mojo/public/dart/src/interface.dart
|
View
|
1
2
3
|
2 chunks |
+85 lines, -57 lines |
0 comments
|
Download
|
 |
M |
mojo/public/dart/src/message_pipe.dart
|
View
|
1
2
3
|
4 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
mojo/public/dart/src/types.dart
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+62 lines, -15 lines |
0 comments
|
Download
|
 |
M |
mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl
|
View
|
1
2
|
5 chunks |
+28 lines, -13 lines |
0 comments
|
Download
|
 |
M |
mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
mojo/public/tools/bindings/generators/mojom_dart_generator.py
|
View
|
1
2
3
|
1 chunk |
+10 lines, -10 lines |
0 comments
|
Download
|
Total messages: 17 (4 generated)
|