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

Side by Side Diff: mojo/public/dart/mojo/lib/src/handle.dart

Issue 1414483010: Dart: Use a RawReceivePort to receive events for Mojo handles. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Merge Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 part of core; 5 part of core;
6 6
7 7
8 class MojoHandle { 8 class MojoHandle {
9 static const int INVALID = 0; 9 static const int INVALID = 0;
10 static const int DEADLINE_INDEFINITE = -1; 10 static const int DEADLINE_INDEFINITE = -1;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 static MojoWaitManyResult waitMany( 75 static MojoWaitManyResult waitMany(
76 List<int> handles, List<int> signals, int deadline) { 76 List<int> handles, List<int> signals, int deadline) {
77 List result = MojoHandleNatives.waitMany(handles, signals, deadline); 77 List result = MojoHandleNatives.waitMany(handles, signals, deadline);
78 List states = result[2] != null 78 List states = result[2] != null
79 ? result[2].map((l) => new MojoHandleSignalsState(l[0], l[1])).toList() 79 ? result[2].map((l) => new MojoHandleSignalsState(l[0], l[1])).toList()
80 : null; 80 : null;
81 return new MojoWaitManyResult(new MojoResult(result[0]), result[1], states); 81 return new MojoWaitManyResult(new MojoResult(result[0]), result[1], states);
82 } 82 }
83 83
84 static MojoResult registerFinalizer(MojoEventStream eventStream) { 84 static MojoResult registerFinalizer(MojoEventHandler eventHandler) {
85 return new MojoResult(MojoHandleNatives.registerFinalizer( 85 return new MojoResult(MojoHandleNatives.registerFinalizer(
86 eventStream, eventStream._handle.h)); 86 eventHandler, eventHandler._handle.h));
87 } 87 }
88 88
89 static bool reportLeakedHandles() => MojoHandleNatives.reportOpenHandles(); 89 static bool reportLeakedHandles() => MojoHandleNatives.reportOpenHandles();
90 } 90 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698