mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 952817 - VariablesView.createHierarchy should always be called when the view is emptied, r=benvie
This commit is contained in:
parent
aa622e68f1
commit
6571c4eeee
@ -114,7 +114,6 @@ ManifestEditor.prototype = {
|
||||
},
|
||||
|
||||
update: function() {
|
||||
this.editor.createHierarchy();
|
||||
this.editor.rawObject = this.manifest;
|
||||
this.editor.commitHierarchy();
|
||||
|
||||
|
@ -841,7 +841,6 @@ StackFrames.prototype = {
|
||||
|
||||
// Start recording any added variables or properties in any scope and
|
||||
// clear existing scopes to create each one dynamically.
|
||||
DebuggerView.Variables.createHierarchy();
|
||||
DebuggerView.Variables.empty();
|
||||
|
||||
// If watch expressions evaluation results are available, create a scope
|
||||
|
@ -154,21 +154,22 @@ VariablesView.prototype = {
|
||||
if (!this._store.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._store.length = 0;
|
||||
this._itemsByElement.clear();
|
||||
this._prevHierarchy = this._currHierarchy;
|
||||
this._currHierarchy = new Map(); // Don't clear, this is just simple swapping.
|
||||
|
||||
// Check if this empty operation may be executed lazily.
|
||||
if (this.lazyEmpty && aTimeout > 0) {
|
||||
this._emptySoon(aTimeout);
|
||||
return;
|
||||
}
|
||||
|
||||
let list = this._list;
|
||||
|
||||
while (list.hasChildNodes()) {
|
||||
list.firstChild.remove();
|
||||
while (this._list.hasChildNodes()) {
|
||||
this._list.firstChild.remove();
|
||||
}
|
||||
|
||||
this._store.length = 0;
|
||||
this._itemsByElement.clear();
|
||||
|
||||
this._appendEmptyNotice();
|
||||
this._toggleSearchVisibility(false);
|
||||
},
|
||||
@ -192,9 +193,6 @@ VariablesView.prototype = {
|
||||
let prevList = this._list;
|
||||
let currList = this._list = this.document.createElement("scrollbox");
|
||||
|
||||
this._store.length = 0;
|
||||
this._itemsByElement.clear();
|
||||
|
||||
this.window.setTimeout(() => {
|
||||
prevList.removeEventListener("keypress", this._onViewKeyPress, false);
|
||||
prevList.removeEventListener("keydown", this._onViewKeyDown, false);
|
||||
@ -2889,7 +2887,7 @@ Property.prototype["@@iterator"] = function*() {
|
||||
|
||||
/**
|
||||
* Forget everything recorded about added scopes, variables or properties.
|
||||
* @see VariablesView.createHierarchy
|
||||
* @see VariablesView.commitHierarchy
|
||||
*/
|
||||
VariablesView.prototype.clearHierarchy = function() {
|
||||
this._prevHierarchy.clear();
|
||||
@ -2897,17 +2895,13 @@ VariablesView.prototype.clearHierarchy = function() {
|
||||
};
|
||||
|
||||
/**
|
||||
* Start recording a hierarchy of any added scopes, variables or properties.
|
||||
* @see VariablesView.commitHierarchy
|
||||
*/
|
||||
VariablesView.prototype.createHierarchy = function() {
|
||||
this._prevHierarchy = this._currHierarchy;
|
||||
this._currHierarchy = new Map(); // Don't clear, this is just simple swapping.
|
||||
};
|
||||
|
||||
/**
|
||||
* Briefly flash the variables that changed between the previous and current
|
||||
* scope/variable/property hierarchies and reopen previously expanded nodes.
|
||||
* Perform operations on all the VariablesView Scopes, Variables and Properties
|
||||
* after you've added all the items you wanted.
|
||||
*
|
||||
* Calling this method is optional, and does the following:
|
||||
* - styles the items overridden by other items in parent scopes
|
||||
* - reopens the items which were previously expanded
|
||||
* - flashes the items whose values changed
|
||||
*/
|
||||
VariablesView.prototype.commitHierarchy = function() {
|
||||
for (let [, currItem] of this._currHierarchy) {
|
||||
|
@ -3469,7 +3469,6 @@ JSTerm.prototype = {
|
||||
_updateVariablesView: function JST__updateVariablesView(aOptions)
|
||||
{
|
||||
let view = aOptions.view;
|
||||
view.createHierarchy();
|
||||
view.empty();
|
||||
|
||||
// We need to avoid pruning the object inspection starting point.
|
||||
|
Loading…
Reference in New Issue
Block a user