list.close();
delete lists[item._idleTimeout];
}
- //if active is called later, then we want to make sure not to insert again
- delete item._idleTimeout;
+ // if active is called later, then we want to make sure not to insert again
+ item._idleTimeout = -1;
};
if (after <= 0) {
// Use the slow case for after == 0
timer = new Timer();
+ timer._callback = callback;
if (arguments.length <= 2) {
timer._onTimeout = function() {
- callback();
- timer.close();
+ this._callback();
+ this.close();
}
} else {
var args = Array.prototype.slice.call(arguments, 2);
timer._onTimeout = function() {
- callback.apply(timer, args);
- timer.close();
+ this._callback.apply(timer, args);
+ this.close();
}
}