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

Unified Diff: runtime/observatory/lib/src/elements/cpu_profile/virtual_tree.dart

Issue 2992893002: Reapply "[vm] Don't enable the profiler by default. Enable the profiler at startup with --observe, … (Closed)
Patch Set: native symbol resolver 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/cpu_profile/virtual_tree.dart
diff --git a/runtime/observatory/lib/src/elements/cpu_profile/virtual_tree.dart b/runtime/observatory/lib/src/elements/cpu_profile/virtual_tree.dart
index 77e1a724f7f84056aa895f76af2c7c440a108f52..21c4388bc43674df1d842e5c3f4d92a2d8625f61 100644
--- a/runtime/observatory/lib/src/elements/cpu_profile/virtual_tree.dart
+++ b/runtime/observatory/lib/src/elements/cpu_profile/virtual_tree.dart
@@ -128,7 +128,14 @@ class CpuProfileVirtualTreeElement extends HtmlElement implements Renderable {
}
_tree = new VirtualTreeElement(create, update, _getChildren,
items: tree.root.children, queue: _r.queue);
- if (tree.root.children.length == 1) {
+ if (tree.root.children.length == 0) {
+ children = [
+ new DivElement()
+ ..classes = ['tree-item']
+ ..children = [new HeadingElement.h1()..text = 'No Samples']
+ ];
+ return;
+ } else if (tree.root.children.length == 1) {
_tree.expand(tree.root.children.first, autoExpandSingleChildNodes: true);
}
children = [_tree];
« no previous file with comments | « runtime/observatory/lib/src/elements/cpu_profile.dart ('k') | runtime/observatory/lib/src/elements/cpu_profile_table.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698