Don't setTimeout() every time the stack is cleared via MessageChannel()

This commit is contained in:
Steve Gravrock
2017-06-16 09:58:41 -07:00
parent 2e737f50ca
commit 9ee7b4ee0b
3 changed files with 12 additions and 2 deletions

View File

@@ -32,6 +32,7 @@ getJasmineRequireObj().clearStack = function(j$) {
tail = tail.next = { task: fn };
channel.port2.postMessage(0);
} else {
currentCallCount = 0;
setTimeout(fn);
}
};