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

Unified Diff: mojo/public/dart/src/message_pipe.dart

Issue 800523004: Dart: Simplifies the handle watcher. Various cleanups and bugfixes. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: cleanup Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/dart/src/interface.dart ('k') | mojo/public/dart/src/types.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/dart/src/message_pipe.dart
diff --git a/mojo/public/dart/src/message_pipe.dart b/mojo/public/dart/src/message_pipe.dart
index 20fca276f7f2490e9a2d0334d91a0d30ad298833..325be42f9371323ea24d03510d05c29dc2ee0340 100644
--- a/mojo/public/dart/src/message_pipe.dart
+++ b/mojo/public/dart/src/message_pipe.dart
@@ -35,14 +35,14 @@ class MojoMessagePipeEndpoint {
static const int READ_FLAG_NONE = 0;
static const int READ_FLAG_MAY_DISCARD = 0;
- RawMojoHandle handle;
+ MojoHandle handle;
MojoResult status;
MojoMessagePipeEndpoint(this.handle);
MojoResult write(ByteData data,
[int numBytes = -1,
- List<RawMojoHandle> handles = null,
+ List<MojoHandle> handles = null,
int flags = 0]) {
if (handle == null) {
status = MojoResult.INVALID_ARGUMENT;
@@ -71,7 +71,7 @@ class MojoMessagePipeEndpoint {
MojoMessagePipeReadResult read(ByteData data,
[int numBytes = -1,
- List<RawMojoHandle> handles = null,
+ List<MojoHandle> handles = null,
int flags = 0]) {
if (handle == null) {
status = MojoResult.INVALID_ARGUMENT;
@@ -113,7 +113,7 @@ class MojoMessagePipeEndpoint {
// Copy out the handles that were read.
if (handles != null) {
for (var i = 0; i < readResult.handlesRead; i++) {
- handles[i].h = mojoHandles[i];
+ handles[i] = new MojoHandle(mojoHandles[i]);
}
}
@@ -143,8 +143,8 @@ class MojoMessagePipe {
}
assert((result is List) && (result.length == 3));
- RawMojoHandle end1 = new RawMojoHandle(result[1]);
- RawMojoHandle end2 = new RawMojoHandle(result[2]);
+ MojoHandle end1 = new MojoHandle(result[1]);
+ MojoHandle end2 = new MojoHandle(result[2]);
MojoMessagePipe pipe = new MojoMessagePipe._();
pipe.endpoints = new List(2);
pipe.endpoints[0] = new MojoMessagePipeEndpoint(end1);
« no previous file with comments | « mojo/public/dart/src/interface.dart ('k') | mojo/public/dart/src/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698