Commit 1f7d86c1 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[object-stats] Visualizer: Reset on Isolate change

No-try: true
Bug: v8:7266
Change-Id: Ia3a0142488765d36485287d0bf4ffa1e2cc635b2
Reviewed-on: https://chromium-review.googlesource.com/883141Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50826}
parent ee4afcbf
...@@ -95,15 +95,16 @@ class DetailsSelection extends HTMLElement { ...@@ -95,15 +95,16 @@ class DetailsSelection extends HTMLElement {
} }
dataChanged() { dataChanged() {
this.clearUI(); this.selection = {categories: {}};
this.resetUI(true);
this.populateSelect( this.populateSelect(
'#isolate-select', Object.keys(this.data).map(v => [v, v])); '#isolate-select', Object.keys(this.data).map(v => [v, v]));
this.handleIsolateChange(); this.handleIsolateChange();
} }
clearUI() { resetUI(resetIsolateSelect) {
this.selection = {categories: {}}; if (resetIsolateSelect) removeAllChildren(this.isolateSelect);
removeAllChildren(this.isolateSelect);
removeAllChildren(this.datasetSelect); removeAllChildren(this.datasetSelect);
removeAllChildren(this.gcSelect); removeAllChildren(this.gcSelect);
this.clearCategories(); this.clearCategories();
...@@ -116,7 +117,7 @@ class DetailsSelection extends HTMLElement { ...@@ -116,7 +117,7 @@ class DetailsSelection extends HTMLElement {
this.selection.isolate = null; this.selection.isolate = null;
return; return;
} }
this.resetUI(false);
this.populateSelect( this.populateSelect(
'#dataset-select', '#dataset-select',
this.data[this.selection.isolate].data_sets.entries(), 'live'); this.data[this.selection.isolate].data_sets.entries(), 'live');
......
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