Bug 830702 - Variables View needs a way to clear hierarchies, to avoid highlighting variable or property changes, r=past

This commit is contained in:
Victor Porof 2013-01-21 23:59:30 +02:00
parent 3d032d1602
commit 3c99d4d133
2 changed files with 15 additions and 0 deletions

View File

@ -70,6 +70,12 @@ function testVariablesView()
testThirdLevelContents();
testIntegrity(arr, obj);
gVariablesView.clearHierarchy();
is (gVariablesView._prevHierarchy.size, 0,
"The previous hierarchy should have been cleared.");
is (gVariablesView._currHierarchy.size, 0,
"The current hierarchy should have been cleared.");
closeDebuggerAndFinish();
}

View File

@ -1880,6 +1880,15 @@ Property.prototype.__iterator__ = function VV_iterator() {
}
};
/**
* Forget everything recorded about added scopes, variables or properties.
* @see VariablesView.createHierarchy
*/
VariablesView.prototype.clearHierarchy = function VV_clearHierarchy() {
this._prevHierarchy = new Map();
this._currHierarchy = new Map();
};
/**
* Start recording a hierarchy of any added scopes, variables or properties.
* @see VariablesView.commitHierarchy