зеркало из https://github.com/mozilla/gecko-dev.git
Bug 882677 - Part 3: Set Track::ReadyState after flushing the parser. r=cpearce
The parser might report errors during the flush call so we can't check and set the ReadyState of the track yet.
This commit is contained in:
Родитель
b1d42e4cd4
Коммит
0837ecc090
|
@ -106,11 +106,11 @@ WebVTTListener::OnStopRequest(nsIRequest* aRequest,
|
||||||
nsISupports* aContext,
|
nsISupports* aContext,
|
||||||
nsresult aStatus)
|
nsresult aStatus)
|
||||||
{
|
{
|
||||||
|
// Attempt to parse any final data the parser might still have.
|
||||||
|
mParserWrapper->Flush();
|
||||||
if (mElement->ReadyState() != TextTrackReadyState::FailedToLoad) {
|
if (mElement->ReadyState() != TextTrackReadyState::FailedToLoad) {
|
||||||
mElement->SetReadyState(TextTrackReadyState::Loaded);
|
mElement->SetReadyState(TextTrackReadyState::Loaded);
|
||||||
}
|
}
|
||||||
// Attempt to parse any final data the parser might still have.
|
|
||||||
mParserWrapper->Flush();
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче