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

Unified Diff: third_party/mojo/src/mojo/public/dart/src/handle_watcher.dart

Issue 877993004: Revert "Update mojo sdk to rev 8d45c89c30b230843c5bd6dd0693a555750946c0" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
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));
« no previous file with comments | « third_party/mojo/src/mojo/public/dart/src/codec.dart ('k') | third_party/mojo/src/mojo/public/dart/src/message.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698