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

Side by Side Diff: runtime/observatory/lib/src/app/page.dart

Issue 1124153006: Heap snapshot visualizations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: sync 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 part of app; 5 part of app;
6 6
7 class IsolateNotFound implements Exception { 7 class IsolateNotFound implements Exception {
8 String isolateId; 8 String isolateId;
9 IsolateNotFound(this.isolateId); 9 IsolateNotFound(this.isolateId);
10 String toString() => "IsolateNotFound: $isolateId"; 10 String toString() => "IsolateNotFound: $isolateId";
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 getIsolate(uri).then((isolate) { 258 getIsolate(uri).then((isolate) {
259 if (element != null) { 259 if (element != null) {
260 /// Update the page. 260 /// Update the page.
261 HeapMapElement page = element; 261 HeapMapElement page = element;
262 page.isolate = isolate; 262 page.isolate = isolate;
263 } 263 }
264 }); 264 });
265 } 265 }
266 } 266 }
267 267
268 class HeapSnapshotPage extends SimplePage {
269 HeapSnapshotPage(app) : super('heap-snapshot', 'heap-snapshot', app);
270
271 void _visit(Uri uri) {
272 super._visit(uri);
273 getIsolate(uri).then((isolate) {
274 if (element != null) {
275 /// Update the page.
276 HeapSnapshotElement page = element;
277 page.isolate = isolate;
278 }
279 });
280 }
281 }
282
268 class ErrorViewPage extends Page { 283 class ErrorViewPage extends Page {
269 ErrorViewPage(app) : super(app); 284 ErrorViewPage(app) : super(app);
270 285
271 void onInstall() { 286 void onInstall() {
272 if (element == null) { 287 if (element == null) {
273 /// Lazily create page. 288 /// Lazily create page.
274 element = new Element.tag('service-view'); 289 element = new Element.tag('service-view');
275 } 290 }
276 } 291 }
277 292
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 void _visit(Uri uri) { 388 void _visit(Uri uri) {
374 assert(element != null); 389 assert(element != null);
375 assert(canVisit(uri)); 390 assert(canVisit(uri));
376 app.vm.getIsolate(uri.queryParameters['isolateId']).then((i) { 391 app.vm.getIsolate(uri.queryParameters['isolateId']).then((i) {
377 (element as MetricsPageElement).isolate = i; 392 (element as MetricsPageElement).isolate = i;
378 }); 393 });
379 } 394 }
380 395
381 bool canVisit(Uri uri) => uri.path == 'metrics'; 396 bool canVisit(Uri uri) => uri.path == 'metrics';
382 } 397 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698