Index: third_party/mojo/src/mojo/public/dart/src/handle_watcher.dart |
diff --git a/third_party/mojo/src/mojo/public/dart/src/handle_watcher.dart b/third_party/mojo/src/mojo/public/dart/src/handle_watcher.dart |
index da688d46c21225fd1f1896e2ead53058fb3b7615..3d14f6ce12853f69cfb8f9f04e8dd967e1bd1dc5 100644 |
--- a/third_party/mojo/src/mojo/public/dart/src/handle_watcher.dart |
+++ b/third_party/mojo/src/mojo/public/dart/src/handle_watcher.dart |
@@ -19,6 +19,11 @@ class _MojoHandleWatcherNatives { |
// The MojoHandleWatcher sends a stream of events to application isolates that |
// register Mojo handles with it. Application isolates make the following calls: |
// |
+// Start() - Starts up the MojoHandleWatcher isolate. Should be called only once |
+// per VM process. |
+// |
+// Stop() - Causes the MojoHandleWatcher isolate to exit. |
+// |
// add(handle, port, signals) - Instructs the MojoHandleWatcher isolate to add |
// 'handle' to the set of handles it watches, and to notify the calling |
// isolate only for the events specified by 'signals' using the send port |
@@ -286,9 +291,7 @@ class MojoHandleWatcher { |
return new MojoResult(result); |
} |
- // Starts up the MojoHandleWatcher isolate. Should be called only once |
- // per VM process. |
- static Future<Isolate> _start() { |
+ static Future<Isolate> Start() { |
// Make a control message pipe, |
MojoMessagePipe pipe = new MojoMessagePipe(); |
int consumerHandle = pipe.endpoints[0].handle.h; |
@@ -302,9 +305,7 @@ class MojoHandleWatcher { |
return Isolate.spawn(_handleWatcherIsolate, consumerHandle); |
} |
- // Causes the MojoHandleWatcher isolate to exit. Should be called only |
- // once per VM process. |
- static void _stop() { |
+ static void Stop() { |
// Create a port for notification that the handle watcher has shutdown. |
var shutdownReceivePort = new ReceivePort(); |
var shutdownSendPort = shutdownReceivePort.sendPort; |
@@ -338,7 +339,7 @@ class MojoHandleWatcher { |
return _sendControlData(mojoHandle, null, _encodeCommand(REMOVE)); |
} |
- static MojoResult timer(Object ignored, SendPort port, int deadline) { |
+ static MojoResult timer(SendPort port, int deadline) { |
// The deadline will be unwrapped before sending to the handle watcher. |
return _sendControlData( |
new MojoHandle(deadline), port, _encodeCommand(TIMER)); |