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-24 00:41:33 +00:00
parent 48d979dff3
commit ef9e1890ec

View File

@ -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());
}
}