follow-up to Bug 578557 - disable idle expiration in manually controlled expiration tests. r=dietrich. orange fix on CLOSED TREE a=developers-channel

This commit is contained in:
Marco Bonardo 2010-07-16 01:04:42 +02:00
Родитель 059b1585ee
Коммит eb2334d6b0
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -684,11 +684,15 @@ nsPlacesExpiration.prototype = {
_isIdleObserver: false, _isIdleObserver: false,
set expireOnIdle(aObserveIdle) { set expireOnIdle(aObserveIdle) {
if (aObserveIdle != this._isIdleObserver) { if (aObserveIdle != this._isIdleObserver) {
if (aObserveIdle && !this._shuttingDown) { // If running a debug expiration we need full control of what happens
// but idle cleanup could activate in the middle, since tinderboxes are
// permanently idle. That would cause unexpected oranges, so disable it.
if (aObserveIdle && !this._shuttingDown &&
this._debugLimit === undefined) {
this._idle.addIdleObserver(this, IDLE_TIMEOUT_SECONDS); this._idle.addIdleObserver(this, IDLE_TIMEOUT_SECONDS);
this._isIdleObserver = true; this._isIdleObserver = true;
} }
else { else if (this._isIdleObserver) {
this._idle.removeIdleObserver(this, IDLE_TIMEOUT_SECONDS); this._idle.removeIdleObserver(this, IDLE_TIMEOUT_SECONDS);
this._isIdleObserver = false; this._isIdleObserver = false;
} }