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

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

Issue 112223002: WebSocket client for VM service (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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/message_router.dart ('k') | runtime/bin/vmservice/running_isolates.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/vmservice/running_isolate.dart
diff --git a/runtime/bin/vmservice/running_isolate.dart b/runtime/bin/vmservice/running_isolate.dart
index cf726c8524caa756cfc7c4fcb4be892e0805eb6d..3dd4839675cd57b80bef44181849e9cc27ed47c7 100644
--- a/runtime/bin/vmservice/running_isolate.dart
+++ b/runtime/bin/vmservice/running_isolate.dart
@@ -4,34 +4,15 @@
part of vmservice;
-class RunningIsolate implements ServiceRequestRouter {
+class RunningIsolate implements MessageRouter {
final int portId;
final SendPort sendPort;
final String name;
RunningIsolate(this.portId, this.sendPort, this.name);
- Future sendMessage(List request) {
- final completer = new Completer.sync();
- final receivePort = new RawReceivePort();
- sendServiceMessage(sendPort, receivePort, request);
- receivePort.handler = (value) {
- receivePort.close();
- if (value is Exception) {
- completer.completeError(value);
- } else {
- completer.complete(value);
- }
- };
- return completer.future;
- }
-
- Future route(ServiceRequest request) {
+ Future<String> route(Message message) {
// Send message to isolate.
- var message = request.toServiceCallMessage();
- return sendMessage(message).then((response) {
- request.setResponse(response);
- return new Future.value(request);
- });
+ return message.send(sendPort);
}
}
« no previous file with comments | « runtime/bin/vmservice/message_router.dart ('k') | runtime/bin/vmservice/running_isolates.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698