[object-stats] Visualizer: Reset on Isolate change

No-try: true
Bug: v8:7266
Change-Id: Ia3a0142488765d36485287d0bf4ffa1e2cc635b2
Reviewed-on: https://chromium-review.googlesource.com/883141
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50826}
This commit is contained in:
Michael Lippautz 2018-01-24 10:02:55 +01:00 committed by Commit Bot
parent ee4afcbf39
commit 1f7d86c187

View File

@ -95,15 +95,16 @@ class DetailsSelection extends HTMLElement {
}
dataChanged() {
this.clearUI();
this.selection = {categories: {}};
this.resetUI(true);
this.populateSelect(
'#isolate-select', Object.keys(this.data).map(v => [v, v]));
this.handleIsolateChange();
}
clearUI() {
this.selection = {categories: {}};
removeAllChildren(this.isolateSelect);
resetUI(resetIsolateSelect) {
if (resetIsolateSelect) removeAllChildren(this.isolateSelect);
removeAllChildren(this.datasetSelect);
removeAllChildren(this.gcSelect);
this.clearCategories();
@ -116,7 +117,7 @@ class DetailsSelection extends HTMLElement {
this.selection.isolate = null;
return;
}
this.resetUI(false);
this.populateSelect(
'#dataset-select',
this.data[this.selection.isolate].data_sets.entries(), 'live');