| Index: runtime/observatory/lib/src/elements/class_allocation_profile.dart
|
| diff --git a/runtime/observatory/lib/src/elements/class_allocation_profile.dart b/runtime/observatory/lib/src/elements/class_allocation_profile.dart
|
| index c678b85215ed96167f07a95b45d44631d771fba4..2b7979d9da8946c99e1634ca75608a0cbd30b8a3 100644
|
| --- a/runtime/observatory/lib/src/elements/class_allocation_profile.dart
|
| +++ b/runtime/observatory/lib/src/elements/class_allocation_profile.dart
|
| @@ -25,6 +25,7 @@ class ClassAllocationProfileElement extends HtmlElement implements Renderable {
|
| Stream<RenderedEvent<ClassAllocationProfileElement>> get onRendered =>
|
| _r.onRendered;
|
|
|
| + M.VM _vm;
|
| M.IsolateRef _isolate;
|
| M.Class _cls;
|
| M.ClassSampleProfileRepository _profiles;
|
| @@ -37,14 +38,16 @@ class ClassAllocationProfileElement extends HtmlElement implements Renderable {
|
| M.IsolateRef get isolate => _isolate;
|
| M.Class get cls => _cls;
|
|
|
| - factory ClassAllocationProfileElement(M.IsolateRef isolate, M.Class cls,
|
| - M.ClassSampleProfileRepository profiles,
|
| + factory ClassAllocationProfileElement(M.VM vm, M.IsolateRef isolate,
|
| + M.Class cls, M.ClassSampleProfileRepository profiles,
|
| {RenderingQueue queue}) {
|
| + assert(vm != null);
|
| assert(isolate != null);
|
| assert(cls != null);
|
| assert(profiles != null);
|
| ClassAllocationProfileElement e = document.createElement(tag.name);
|
| e._r = new RenderingScheduler(e, queue: queue);
|
| + e._vm = vm;
|
| e._isolate = isolate;
|
| e._cls = cls;
|
| e._profiles = profiles;
|
| @@ -73,7 +76,7 @@ class ClassAllocationProfileElement extends HtmlElement implements Renderable {
|
| return;
|
| }
|
| final content = [
|
| - new SampleBufferControlElement(isolate.vm, _progress, _progressStream,
|
| + new SampleBufferControlElement(_vm, _progress, _progressStream,
|
| selectedTag: _tag, queue: _r.queue)
|
| ..onTagChange.listen((e) {
|
| _tag = e.element.selectedTag;
|
| @@ -103,9 +106,10 @@ class ClassAllocationProfileElement extends HtmlElement implements Renderable {
|
| children = content;
|
| }
|
|
|
| - Future _request() async {
|
| + Future _request({bool forceFetch: false}) async {
|
| _progress = null;
|
| - _progressStream = _profiles.get(_isolate, _cls, _tag);
|
| + _progressStream =
|
| + _profiles.get(_isolate, _cls, _tag, forceFetch: forceFetch);
|
| _r.dirty();
|
| _progress = (await _progressStream.first).progress;
|
| _r.dirty();
|
|
|