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

Unified Diff: runtime/vm/service/running_isolates.dart

Issue 897193002: Finish moving service protocol to json rpc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review 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
« no previous file with comments | « runtime/vm/service/message.dart ('k') | runtime/vm/service/service.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service/running_isolates.dart
diff --git a/runtime/vm/service/running_isolates.dart b/runtime/vm/service/running_isolates.dart
index 124eb90086ec4d66061b5dba22e1f8ebc06f45cc..776649124ee95db18804402bdb8240dbfa6065a4 100644
--- a/runtime/vm/service/running_isolates.dart
+++ b/runtime/vm/service/running_isolates.dart
@@ -26,11 +26,7 @@ class RunningIsolates implements MessageRouter {
}
Future<String> route(Message message) {
- if (message.isOld) {
- return routeOld(message);
- }
-
- String isolateParam = message.params['isolate'];
+ String isolateParam = message.params['isolateId'];
int isolateId;
if (!isolateParam.startsWith('isolates/')) {
message.setErrorResponse('Malformed isolate id $isolateParam');
@@ -54,39 +50,4 @@ class RunningIsolates implements MessageRouter {
}
return isolate.route(message);
}
-
- Future<String> routeOld(Message message) {
- if (message.path.length == 0) {
- message.setErrorResponse('No path.');
- return message.response;
- }
- if (message.path[0] != 'isolates') {
- message.setErrorResponse('Path must begin with /isolates/');
- return message.response;
- }
- if (message.path.length < 2) {
- message.setErrorResponse('An isolate id must be provided');
- return message.response;
- }
- var isolateId;
- if ((message.path[1] == 'root') && (_rootPortId != null)) {
- isolateId = _rootPortId;
- } else {
- try {
- isolateId = int.parse(message.path[1]);
- } catch (e) {
- message.setErrorResponse('Could not parse isolate id: $e');
- return message.response;
- }
- }
- assert(isolateId != null);
- var isolate = isolates[isolateId];
- if (isolate == null) {
- message.setErrorResponse('Cannot find isolate id: $isolateId');
- return message.response;
- }
- // Consume '/isolates/isolateId'
- message.path.removeRange(0, 2);
- return isolate.route(message);
- }
}
« no previous file with comments | « runtime/vm/service/message.dart ('k') | runtime/vm/service/service.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698