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

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

Issue 1290023002: Hide empty CPU profile on class page (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 | « no previous file | runtime/observatory/lib/src/elements/cpu_profile.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/elements/class_view.dart
diff --git a/runtime/observatory/lib/src/elements/class_view.dart b/runtime/observatory/lib/src/elements/class_view.dart
index cfd535b1a2b47e8a057c6da34e7329a77790d7ef..998f82d6a914ab1fed3f502c79ccfc4524abfcf9 100644
--- a/runtime/observatory/lib/src/elements/class_view.dart
+++ b/runtime/observatory/lib/src/elements/class_view.dart
@@ -62,9 +62,11 @@ class ClassViewElement extends ObservatoryElement {
shadowRoot.querySelector('#stackTraceTreeConfig');
assert(stackTraceTreeConfigElement != null);
stackTraceTreeConfigElement.onTreeConfigChange = onTreeConfigChange;
+ stackTraceTreeConfigElement.show = false;
cpuProfileTreeElement = shadowRoot.querySelector('#cpuProfileTree');
assert(cpuProfileTreeElement != null);
cpuProfileTreeElement.profile = sampleBufferControlElement.profile;
+ cpuProfileTreeElement.show = false;
cls.fields.forEach((field) => field.reload());
sampleBufferControlElement.allocationProfileClass = cls;
}
@@ -84,6 +86,8 @@ class ClassViewElement extends ObservatoryElement {
}
onSampleBufferChange(CpuProfile sampleBuffer) {
+ stackTraceTreeConfigElement.show = sampleBuffer.sampleCount > 0;
+ cpuProfileTreeElement.show = sampleBuffer.sampleCount > 0;
cpuProfileTreeElement.render();
}
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/cpu_profile.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698