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

Side by Side Diff: runtime/observatory/lib/src/elements/isolate_reconnect.dart

Issue 1120133002: Rework error handling in the service protocol and in Observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix tests Created 5 years, 7 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) 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 isolate_reconnect_element; 5 library isolate_reconnect_element;
6 6
7 import 'dart:html';
8 import 'package:polymer/polymer.dart'; 7 import 'package:polymer/polymer.dart';
9 import 'observatory_element.dart'; 8 import 'observatory_element.dart';
10 import 'package:observatory/app.dart';
11 import 'package:observatory/service_html.dart';
12 9
13 @CustomTag('isolate-reconnect') 10 @CustomTag('isolate-reconnect')
14 class IsolateReconnectElement extends ObservatoryElement { 11 class IsolateReconnectElement extends ObservatoryElement {
15 IsolateReconnectElement.created() : super.created(); 12 IsolateReconnectElement.created() : super.created();
16 13
17 get missingIsolateId { 14 get missingIsolateId {
18 return app.locationManager.uri.queryParameters['originalIsolateId']; 15 return app.locationManager.uri.queryParameters['originalIsolateId'];
19 } 16 }
20 17
21 linkToContinueIn(isolate) { 18 linkToContinueIn(isolate) {
22 var parameters = new Map.from(app.locationManager.uri.queryParameters); 19 var parameters = new Map.from(app.locationManager.uri.queryParameters);
23 parameters['isolateId'] = isolate.id; 20 parameters['isolateId'] = isolate.id;
24 parameters.remove('originalIsolateId'); 21 parameters.remove('originalIsolateId');
25 var path = parameters.remove('originalPath'); 22 var path = parameters.remove('originalPath');
26 path = "/$path"; 23 path = "/$path";
27 var generatedUri = new Uri(path: path, queryParameters: parameters); 24 var generatedUri = new Uri(path: path, queryParameters: parameters);
28 return app.locationManager.makeLink(generatedUri.toString()); 25 return app.locationManager.makeLink(generatedUri.toString());
29 } 26 }
30 } 27 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/io_view.dart ('k') | runtime/observatory/lib/src/elements/isolate_view.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698