Bug 1550633 - part4 : no need to run text track selection in stable state. r=bzbarsky

According to spec [1], it doesn't mention that we have to run text track selection in stable state, it just said "the user agent must queue a task to run the following steps".

[1] https://html.spec.whatwg.org/multipage/media.html#honor-user-preferences-for-automatic-text-track-selection

Differential Revision: https://phabricator.services.mozilla.com/D31374

--HG--
extra : moz-landing-system : lando
This commit is contained in:
alwu 2019-05-20 17:34:41 +00:00
Родитель 37cc9f6d00
Коммит 23bcbc20f7
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -166,7 +166,7 @@ already_AddRefed<TextTrack> TextTrackManager::AddTextTrack(
RefPtr<nsIRunnable> task = NewRunnableMethod(
"dom::TextTrackManager::HonorUserPreferencesForTrackSelection", this,
&TextTrackManager::HonorUserPreferencesForTrackSelection);
nsContentUtils::RunInStableState(task.forget());
NS_DispatchToMainThread(task.forget());
}
return track.forget();
@ -185,7 +185,7 @@ void TextTrackManager::AddTextTrack(TextTrack* aTextTrack) {
RefPtr<nsIRunnable> task = NewRunnableMethod(
"dom::TextTrackManager::HonorUserPreferencesForTrackSelection", this,
&TextTrackManager::HonorUserPreferencesForTrackSelection);
nsContentUtils::RunInStableState(task.forget());
NS_DispatchToMainThread(task.forget());
}
}