Bug 735894 - Fire the discard timeout twice as often, so images are discarded after between 1 and 1.5 discard timeout intervals, instead of between 1 and 2 intervals. r=joe

--HG--
extra : rebase_source : 2ca143b901616b42d3e7c8f25349d04f5f0cb288
This commit is contained in:
Justin Lebar 2012-03-15 16:30:41 -04:00
parent bc51699ce4
commit 0b22c2a7c4

View File

@ -199,10 +199,12 @@ DiscardTracker::EnableTimer()
return NS_OK;
sTimerOn = true;
// Activate
// Activate the timer. Have it call us back in (sMinDiscardTimeoutMs / 2)
// ms, so that an image is discarded between sMinDiscardTimeoutMs and
// (3/2 * sMinDiscardTimeoutMs) ms after it's unlocked.
return sTimer->InitWithFuncCallback(TimerCallback,
nsnull,
sMinDiscardTimeoutMs,
sMinDiscardTimeoutMs / 2,
nsITimer::TYPE_REPEATING_SLACK);
}