Rename for stack-clearing post spec run to be more clear; use the real setTimeout when clearing stack

This commit is contained in:
Davis W. Frank and Sheel Choksi
2013-07-02 09:51:41 -07:00
parent 2916a8a1ff
commit f5bc9faf63
5 changed files with 17 additions and 15 deletions

View File

@@ -3,7 +3,7 @@ getJasmineRequireObj().QueueRunner = function() {
function QueueRunner(attrs) {
this.fns = attrs.fns || [];
this.onComplete = attrs.onComplete || function() {};
this.encourageGC = attrs.encourageGC || function(fn) {fn();};
this.clearStack = attrs.clearStack || function(fn) {fn();};
this.onException = attrs.onException || function() {};
this.catchException = attrs.catchException || function() { return true; };
}
@@ -14,7 +14,7 @@ getJasmineRequireObj().QueueRunner = function() {
QueueRunner.prototype.run = function(fns, index) {
if (index >= fns.length) {
this.encourageGC(this.onComplete);
this.clearStack(this.onComplete);
return;
}