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

Unified Diff: runtime/observatory/lib/src/elements/class_allocation_profile.dart

Issue 2999763002: Clear analyzer warning on Observatory (Closed)
Patch Set: Created 3 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
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();
« no previous file with comments | « runtime/observatory/lib/src/cpu_profile/cpu_profile.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