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

Unified Diff: runtime/bin/vmservice/server.dart

Issue 584023004: Service isolate rework (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « runtime/bin/vmservice/resources.dart ('k') | runtime/bin/vmservice/vmservice_io.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/vmservice/server.dart
diff --git a/runtime/bin/vmservice/server.dart b/runtime/bin/vmservice/server.dart
index c21f2426fed405accbad4a9cba38077e331711f7..17512580d5e0738c717910b532109fa75c9b51c8 100644
--- a/runtime/bin/vmservice/server.dart
+++ b/runtime/bin/vmservice/server.dart
@@ -165,15 +165,17 @@ class Server {
return HttpServer.bind(_ip, _port).then((s) {
_server = s;
_server.listen(_requestHandler);
+ var ip = _server.address.address.toString();
if (_displayMessages) {
- var ip = _server.address.address.toString();
var port = _server.port.toString();
print('Observatory listening on http://$ip:$port');
}
// Server is up and running.
+ _notifyServerState(ip, _server.port);
return this;
}).catchError((e, st) {
print('Could not start Observatory HTTP server:\n$e\n$st\n');
+ _notifyServerState("", 0);
return this;
});
}
@@ -195,12 +197,17 @@ class Server {
print('Observatory no longer listening on http://$ip:$port');
}
_server = null;
+ _notifyServerState("", 0);
return this;
}).catchError((e, st) {
_server = null;
print('Could not shutdown Observatory HTTP server:\n$e\n$st\n');
+ _notifyServerState("", 0);
return this;
});
}
}
+
+void _notifyServerState(String ip, int port)
+ native "VMServiceIO_NotifyServerState";
« no previous file with comments | « runtime/bin/vmservice/resources.dart ('k') | runtime/bin/vmservice/vmservice_io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698