Commit 96de054c authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[object-stats] Fix heap visualizer

R: hpayer@chromium.org
No-try: true
Bug: v8:7266
Change-Id: Icc8f254d4f4e7c220cc322b3c98749da5e5ea3e6
Reviewed-on: https://chromium-review.googlesource.com/866831
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50594}
parent 27629cba
...@@ -102,7 +102,7 @@ const CATEGORIES = new Map([ ...@@ -102,7 +102,7 @@ const CATEGORIES = new Map([
'INTERCEPTOR_INFO_TYPE', 'INTERCEPTOR_INFO_TYPE',
'JS_API_OBJECT_TYPE', 'JS_API_OBJECT_TYPE',
'JS_ARRAY_BOILERPLATE_TYPE', 'JS_ARRAY_BOILERPLATE_TYPE',
'JS_OBJECT_BOILERPLATE_TYPE' 'JS_OBJECT_BOILERPLATE_TYPE',
'JS_SPECIAL_API_OBJECT_TYPE', 'JS_SPECIAL_API_OBJECT_TYPE',
'MAP_TYPE', 'MAP_TYPE',
'OBJECT_TEMPLATE_INFO_TYPE', 'OBJECT_TEMPLATE_INFO_TYPE',
......
...@@ -84,6 +84,11 @@ class DetailsSelection extends HTMLElement { ...@@ -84,6 +84,11 @@ class DetailsSelection extends HTMLElement {
handleIsolateChange(e) { handleIsolateChange(e) {
this.selection.isolate = this.isolateSelect.value; this.selection.isolate = this.isolateSelect.value;
if (this.selection.isolate.length === 0) {
this.selection.isolate = null;
return;
}
this.populateSelect( this.populateSelect(
'#dataset-select', this.data[this.selection.isolate].data_sets, 'live'); '#dataset-select', this.data[this.selection.isolate].data_sets, 'live');
this.populateCategories(); this.populateCategories();
......
...@@ -44,8 +44,20 @@ class GlobalTimeline extends HTMLElement { ...@@ -44,8 +44,20 @@ class GlobalTimeline extends HTMLElement {
return this.data && this.selection; return this.data && this.selection;
} }
hide() {
this.$('#container').style.display = 'none';
}
show() {
this.$('#container').style.display = 'block';
}
stateChanged() { stateChanged() {
if (this.isValid()) this.drawChart(); if (this.isValid()) {
this.drawChart();
} else {
this.hide();
}
} }
getCategoryData() { getCategoryData() {
...@@ -115,7 +127,7 @@ class GlobalTimeline extends HTMLElement { ...@@ -115,7 +127,7 @@ class GlobalTimeline extends HTMLElement {
explorer: {}, explorer: {},
}; };
const chart = new google.visualization.AreaChart(this.$('#chart')); const chart = new google.visualization.AreaChart(this.$('#chart'));
this.$('#container').style.display = 'block'; this.show();
chart.draw(data, google.charts.Line.convertOptions(options)); chart.draw(data, google.charts.Line.convertOptions(options));
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment