Fix tests for new stack clearing in IE
This commit is contained in:
@@ -21,13 +21,16 @@ getJasmineRequireObj().clearStack = function(j$) {
|
||||
if (global && global.process && j$.isFunction_(global.process.nextTick)) {
|
||||
return global.process.nextTick;
|
||||
} else if (j$.isFunction_(global.setImmediate)) {
|
||||
return global.setImmediate;
|
||||
var realSetImmediate = global.setImmediate;
|
||||
return function(fn) {
|
||||
realSetImmediate(fn);
|
||||
};
|
||||
} else if (!j$.util.isUndefined(global.MessageChannel)) {
|
||||
return messageChannelImpl(global);
|
||||
} else if (j$.isFunction_(global.setTimeout)) {
|
||||
} else {
|
||||
var realSetTimeout = global.setTimeout;
|
||||
return function clearStack(fn) {
|
||||
realSetTimeout(fn, 0);
|
||||
Function.prototype.apply.apply(realSetTimeout, [global, [fn, 0]]);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user