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

Side by Side Diff: runtime/vm/service/vmservice.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library vmservice; 5 library vmservice;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:isolate'; 9 import 'dart:isolate';
10 10
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 135 }
136 136
137 Future<String> route(Message message) { 137 Future<String> route(Message message) {
138 if (message.completed) { 138 if (message.completed) {
139 return message.response; 139 return message.response;
140 } 140 }
141 if ((message.path.length == 1) && (message.path[0] == 'clients')) { 141 if ((message.path.length == 1) && (message.path[0] == 'clients')) {
142 _clientCollection(message); 142 _clientCollection(message);
143 return message.response; 143 return message.response;
144 } 144 }
145 if (message.isOld) { 145 if (message.params['isolate'] != null) {
Cutch 2015/02/05 14:54:48 in the Uri we use 'isolateId' but here we use the
146 if (message.path[0] == 'isolates') { 146 return runningIsolates.route(message);
147 return runningIsolates.route(message);
148 }
149 } else {
150 if (message.params['isolate'] != null) {
151 return runningIsolates.route(message);
152 }
153 } 147 }
154 return message.sendToVM(); 148 return message.sendToVM();
155 } 149 }
156 } 150 }
157 151
158 RawReceivePort boot() { 152 RawReceivePort boot() {
159 // Return the port we expect isolate startup and shutdown messages on. 153 // Return the port we expect isolate startup and shutdown messages on.
160 return isolateLifecyclePort; 154 return isolateLifecyclePort;
161 } 155 }
162 156
163 void _registerIsolate(int port_id, SendPort sp, String name) { 157 void _registerIsolate(int port_id, SendPort sp, String name) {
164 var service = new VMService(); 158 var service = new VMService();
165 service.runningIsolates.isolateStartup(port_id, sp, name); 159 service.runningIsolates.isolateStartup(port_id, sp, name);
166 } 160 }
167 161
168 void _setEventMask(int mask) 162 void _setEventMask(int mask)
169 native "VMService_SetEventMask"; 163 native "VMService_SetEventMask";
170 164
171 void _onStart() native "VMService_OnStart"; 165 void _onStart() native "VMService_OnStart";
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698