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

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: 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: runtime/vm/service/running_isolates.dart
diff --git a/runtime/vm/service/running_isolates.dart b/runtime/vm/service/running_isolates.dart
index 124eb90086ec4d66061b5dba22e1f8ebc06f45cc..46ec01fdfea911c4c391f26cb814b8e45a702f97 100644
--- a/runtime/vm/service/running_isolates.dart
+++ b/runtime/vm/service/running_isolates.dart
@@ -26,10 +26,6 @@ class RunningIsolates implements MessageRouter {
}
Future<String> route(Message message) {
- if (message.isOld) {
- return routeOld(message);
- }
-
String isolateParam = message.params['isolate'];
int isolateId;
if (!isolateParam.startsWith('isolates/')) {
@@ -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);
- }
}

Powered by Google App Engine
This is Rietveld 408576698