зеркало из https://github.com/mozilla/gecko-dev.git
Bug 289275 - Don't correct eventsPerStep if the time taken was 0, because we end up at Infinity!
r=silver a=asa p=gijskruitbosch@gmail.com (Gijs "Hannibal" Kruitbosch)
This commit is contained in:
Родитель
8539c0b350
Коммит
da16af5676
|
@ -313,8 +313,9 @@ function ep_stepevents()
|
|||
en = new Date();
|
||||
|
||||
// i == number of items handled this time.
|
||||
// We only want to do this if we handled at least 25% of our step-limit.
|
||||
if (i * 4 >= this.eventsPerStep)
|
||||
// We only want to do this if we handled at least 25% of our step-limit
|
||||
// and if we have a sane interval between st and en (not zero).
|
||||
if ((i * 4 >= this.eventsPerStep) && (en - st > 0))
|
||||
{
|
||||
// Calculate the number of events that can be processed in 400ms.
|
||||
var newVal = (400 * i) / (en - st);
|
||||
|
|
Загрузка…
Ссылка в новой задаче