Bug 1230483 - Part 2 - LoadFromSourceChildren() should be queued at most once in an event cycle. r=roc

This commit is contained in:
JW Wang 2015-12-21 19:55:43 +08:00
Родитель cda9d2e5e1
Коммит 9e2d0d9fab
1 изменённых файлов: 3 добавлений и 0 удалений

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

@ -4356,6 +4356,9 @@ void HTMLMediaElement::NotifyAddedSource()
// A load was paused in the resource selection algorithm, waiting for
// a new source child to be added, resume the resource selection algorithm.
if (mLoadWaitStatus == WAITING_FOR_SOURCE) {
// Rest the flag so we don't queue multiple LoadFromSourceTask() when
// multiple <source> are attached in an event loop.
mLoadWaitStatus = NOT_WAITING;
QueueLoadFromSourceTask();
}
}