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

Unified Diff: runtime/observatory/lib/src/app/page.dart

Issue 2266343002: Converted Observatory heap-snapshot element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Removed debug code Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/observatory/lib/service.dart ('k') | runtime/observatory/lib/src/elements/class_view.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/app/page.dart
diff --git a/runtime/observatory/lib/src/app/page.dart b/runtime/observatory/lib/src/app/page.dart
index dca602e1205917e90a2337b659ead13291ea75b3..cb409a98dfd6f3372cf641c23e295e09ceda2427 100644
--- a/runtime/observatory/lib/src/app/page.dart
+++ b/runtime/observatory/lib/src/app/page.dart
@@ -6,6 +6,8 @@ part of app;
AllocationProfileRepository _allocationProfileRepository
= new AllocationProfileRepository();
+HeapSnapshotRepository _heapSnapshotRepository
+ = new HeapSnapshotRepository();
InstanceRepository _instanceRepository = new InstanceRepository();
IsolateSampleProfileRepository _isolateSampleProfileRepository
= new IsolateSampleProfileRepository();
@@ -356,19 +358,27 @@ class HeapMapPage extends SimplePage {
}
}
-class HeapSnapshotPage extends SimplePage {
- HeapSnapshotPage(app) : super('heap-snapshot', 'heap-snapshot', app);
+class HeapSnapshotPage extends MatchingPage {
+ HeapSnapshotPage(app) : super('heap-snapshot', app);
+
+ DivElement container = new DivElement();
void _visit(Uri uri) {
super._visit(uri);
getIsolate(uri).then((isolate) {
- if (element != null) {
- /// Update the page.
- HeapSnapshotElement page = element;
- page.isolate = isolate;
- }
+ container.children = [
+ new HeapSnapshotElement(isolate.vm, isolate, app.events,
+ app.notifications, _heapSnapshotRepository,
+ _instanceRepository, queue: app.queue)
+ ];
});
}
+
+ void onInstall() {
+ if (element == null) {
+ element = container;
+ }
+ }
}
« no previous file with comments | « runtime/observatory/lib/service.dart ('k') | runtime/observatory/lib/src/elements/class_view.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698