зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1133483 - Dispatch |NoSupportedMediaSourceError| to main thread in |SelectResource|. r=jwwang
We need to end the synchronous section when the src attribute is empty and then run the "failed with elements step" in non-sync section. MozReview-Commit-ID: DJ7GYqa6aI5 --HG-- extra : rebase_source : 41f4312408a62497a52e301cfacc2ac209e89bd4
This commit is contained in:
Родитель
066f1e3664
Коммит
32abedf65d
|
@ -1759,7 +1759,12 @@ void HTMLMediaElement::SelectResource()
|
|||
const char16_t* params[] = { src.get() };
|
||||
ReportLoadError("MediaLoadInvalidURI", params, ArrayLength(params));
|
||||
}
|
||||
NoSupportedMediaSourceError();
|
||||
// The media element has neither a src attribute nor a source element child:
|
||||
// set the networkState to NETWORK_EMPTY, and abort these steps; the
|
||||
// synchronous section ends.
|
||||
nsCOMPtr<nsIRunnable> event =
|
||||
NewRunnableMethod<nsCString>(this, &HTMLMediaElement::NoSupportedMediaSourceError, nsCString());
|
||||
NS_DispatchToMainThread(event);
|
||||
} else {
|
||||
// Otherwise, the source elements will be used.
|
||||
mIsLoadingFromSourceChildren = true;
|
||||
|
|
Загрузка…
Ссылка в новой задаче