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

Side by Side Diff: runtime/observatory/bin/shell.dart

Issue 899303002: Fix dart warnings. (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
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/general_error.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 shell; 5 library shell;
6 6
7 import 'package:observatory/service_io.dart'; 7 import 'package:observatory/service_io.dart';
8 8
9 import 'dart:io'; 9 import 'dart:io';
10 10
11 // Simple demo for service_io library. Connects to localhost on the default 11 // Simple demo for service_io library. Connects to localhost on the default
12 // port, picks the first isolate, reads requests from stdin, and prints 12 // port, picks the first isolate, reads requests from stdin, and prints
13 // results to stdout. Example session: 13 // results to stdout. Example session:
14 // <<< isolate isolates/1071334835 14 // <<< isolate isolates/1071334835
15 // >>> /classes/40 15 // >>> /classes/40
16 // <<< {"type":"Class","id":"classes\/40","name":"num","user_name":"num",... 16 // <<< {"type":"Class","id":"classes\/40","name":"num","user_name":"num",...
17 // >>> /objects/0 17 // >>> /objects/0
18 // >>> {"type":"Array","class":{"type":"@Class","id":"classes\/62",... 18 // >>> {"type":"Array","class":{"type":"@Class","id":"classes\/62",...
19 19
20 void repl(VM vm, Isolate isolate, String lastResult) { 20 void repl(VM vm, Isolate isolate, String lastResult) {
21 print(lastResult); 21 print(lastResult);
22 Map params = { 22 Map params = {
23 'objectId': stdin.readLineSync(), 23 'objectId': stdin.readLineSync(),
24 }; 24 };
25 isolate.invokeRpc('getObject', params).then((String result) { 25 isolate.invokeRpcNoUpgrade('getObject', params).then((Map result) {
26 repl(vm, prefix, result); 26 repl(vm, isolate, result.toString());
27 }); 27 });
28 } 28 }
29 29
30 void main() { 30 void main() {
31 String addr = 'ws://localhost:8181/ws'; 31 String addr = 'ws://localhost:8181/ws';
32 new WebSocketVM(new WebSocketVMTarget(addr)).load().then((VM vm) { 32 new WebSocketVM(new WebSocketVMTarget(addr)).load().then((VM vm) {
33 Isolate isolate = vm.isolates.first; 33 Isolate isolate = vm.isolates.first;
34 repl(vm, isolate, 'isolate ${isolate.id}'); 34 repl(vm, isolate, 'isolate ${isolate.id}');
35 }); 35 });
36 } 36 }
OLDNEW
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/general_error.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698