зеркало из https://github.com/mozilla/gecko-dev.git
Bug 882677 - Part 4: TextTrack::ReadyState should be set to 'error' if loading the stream fails. r=cpearce
This commit is contained in:
Родитель
0837ecc090
Коммит
380383be80
|
@ -106,12 +106,15 @@ WebVTTListener::OnStopRequest(nsIRequest* aRequest,
|
|||
nsISupports* aContext,
|
||||
nsresult aStatus)
|
||||
{
|
||||
if (NS_FAILED(aStatus)) {
|
||||
mElement->SetReadyState(TextTrackReadyState::FailedToLoad);
|
||||
}
|
||||
// Attempt to parse any final data the parser might still have.
|
||||
mParserWrapper->Flush();
|
||||
if (mElement->ReadyState() != TextTrackReadyState::FailedToLoad) {
|
||||
mElement->SetReadyState(TextTrackReadyState::Loaded);
|
||||
}
|
||||
return NS_OK;
|
||||
return aStatus;
|
||||
}
|
||||
|
||||
NS_METHOD
|
||||
|
|
Загрузка…
Ссылка в новой задаче