OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |