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

Side by Side Diff: runtime/bin/vmservice/server.dart

Issue 993613002: Implement 'print', 'up', 'down', and 'frame' commands in the Observatory debugger. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 5 years, 9 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
« no previous file with comments | « runtime/bin/dbg_message.cc ('k') | runtime/observatory/lib/service_common.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 part of vmservice_io; 5 part of vmservice_io;
6 6
7 class WebSocketClient extends Client { 7 class WebSocketClient extends Client {
8 static const int PARSE_ERROR_CODE = 4000; 8 static const int PARSE_ERROR_CODE = 4000;
9 static const int BINARY_MESSAGE_ERROR_CODE = 4001; 9 static const int BINARY_MESSAGE_ERROR_CODE = 4001;
10 static const int NOT_MAP_ERROR_CODE = 4002; 10 static const int NOT_MAP_ERROR_CODE = 4002;
(...skipping 13 matching lines...) Expand all
24 map = JSON.decode(message); 24 map = JSON.decode(message);
25 } catch (e) { 25 } catch (e) {
26 socket.close(PARSE_ERROR_CODE, 'Message parse error: $e'); 26 socket.close(PARSE_ERROR_CODE, 'Message parse error: $e');
27 return; 27 return;
28 } 28 }
29 if (map is! Map) { 29 if (map is! Map) {
30 socket.close(NOT_MAP_ERROR_CODE, 'Message must be a JSON map.'); 30 socket.close(NOT_MAP_ERROR_CODE, 'Message must be a JSON map.');
31 return; 31 return;
32 } 32 }
33 var serial = map['id']; 33 var serial = map['id'];
34 34 onMessage(serial, new Message.fromJsonRpc(map));
35 onMessage(serial, new Message.fromJsonRpc(map['method'], map['params']));
36 } else { 35 } else {
37 socket.close(BINARY_MESSAGE_ERROR_CODE, 'Message must be a string.'); 36 socket.close(BINARY_MESSAGE_ERROR_CODE, 'Message must be a string.');
38 } 37 }
39 } 38 }
40 39
41 void post(var serial, dynamic response) { 40 void post(var serial, dynamic response) {
42 try { 41 try {
43 Map map = { 42 Map map = {
44 'id': serial, 43 'id': serial,
45 'response': response 44 'response': response
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 print('Could not shutdown Observatory HTTP server:\n$e\n$st\n'); 204 print('Could not shutdown Observatory HTTP server:\n$e\n$st\n');
206 _notifyServerState("", 0); 205 _notifyServerState("", 0);
207 return this; 206 return this;
208 }); 207 });
209 } 208 }
210 209
211 } 210 }
212 211
213 void _notifyServerState(String ip, int port) 212 void _notifyServerState(String ip, int port)
214 native "VMServiceIO_NotifyServerState"; 213 native "VMServiceIO_NotifyServerState";
OLDNEW
« no previous file with comments | « runtime/bin/dbg_message.cc ('k') | runtime/observatory/lib/service_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698