Bug 1401919 - Functions used after the seekToNextFrame promise should not be interpreted half the time, r=nbp.

This commit is contained in:
Florian Quèze 2017-10-04 16:01:04 +02:00
Родитель ac2f2367a9
Коммит d906e37232
1 изменённых файлов: 12 добавлений и 0 удалений

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

@ -2660,6 +2660,18 @@ HTMLMediaElement::FastSeek(double aTime, ErrorResult& aRv)
already_AddRefed<Promise>
HTMLMediaElement::SeekToNextFrame(ErrorResult& aRv)
{
/* This will cause JIT code to be kept around longer, to help performance
* when using SeekToNextFrame to iterate through every frame of a video.
*/
nsCOMPtr<nsIGlobalObject> global =
do_QueryInterface(OwnerDoc()->GetInnerWindow());
if (global) {
if (JSObject *obj = global->GetGlobalJSObject()) {
js::NotifyAnimationActivity(obj);
}
}
return Seek(CurrentTime(), SeekTarget::NextFrame, aRv);
}