Chromium Code Reviews| 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 e5d0b1f836c5a94ca31d24f6e57dffd63ddca766..5ab9001c3abc90ffd0479e3b3042030eb8077aca 100644 |
| --- a/runtime/observatory/lib/src/app/page.dart |
| +++ b/runtime/observatory/lib/src/app/page.dart |
| @@ -4,6 +4,8 @@ |
| part of app; |
| +AllocationProfileRepository _heapProfileRepository |
|
Cutch
2016/08/17 14:28:44
_allocationProfileRepository
cbernaschina
2016/08/17 17:01:27
Done.
|
| + = new AllocationProfileRepository(); |
| IsolateSampleProfileRepository _isolateSampleProfileRepository |
| = new IsolateSampleProfileRepository(); |
| @@ -269,20 +271,33 @@ class TableCpuProfilerPage extends SimplePage { |
| } |
| } |
| -class AllocationProfilerPage extends SimplePage { |
| - AllocationProfilerPage(app) |
| - : super('allocation-profiler', 'heap-profile', app); |
| +class AllocationProfilerPage extends MatchingPage { |
| + AllocationProfilerPage(app) : super('allocation-profiler', app); |
| + |
| + DivElement container = new DivElement(); |
| void _visit(Uri uri) { |
| super._visit(uri); |
| getIsolate(uri).then((isolate) { |
| - if (element != null) { |
| - /// Update the page. |
| - HeapProfileElement page = element; |
| - page.isolate = isolate; |
| - } |
| + container.children = [ |
| + new AllocationProfileElement(isolate.vm, isolate, app.events, |
| + app.notifications, _heapProfileRepository, |
| + queue: app.queue) |
| + ]; |
| }); |
| } |
| + |
| + void onInstall() { |
| + if (element == null) { |
| + element = container; |
| + } |
| + app.startGCEventListener(); |
| + } |
| + |
| + void onUninstall() { |
| + super.onUninstall(); |
| + app.stopGCEventListener(); |
| + } |
| } |
| class PortsPage extends SimplePage { |