зеркало из https://github.com/mozilla/gecko-dev.git
Bug 931453 - Ensure TextTrack's media element reference is not null. r=khuey
This commit is contained in:
Родитель
afb59eda40
Коммит
6070d164e6
|
@ -182,8 +182,8 @@ void
|
||||||
TextTrack::SetReadyState(uint16_t aState)
|
TextTrack::SetReadyState(uint16_t aState)
|
||||||
{
|
{
|
||||||
mReadyState = aState;
|
mReadyState = aState;
|
||||||
if (mReadyState == HTMLTrackElement::LOADED ||
|
if (mMediaElement && (mReadyState == HTMLTrackElement::LOADED ||
|
||||||
mReadyState == HTMLTrackElement::ERROR) {
|
mReadyState == HTMLTrackElement::ERROR)) {
|
||||||
mMediaElement->RemoveTextTrack(this, true);
|
mMediaElement->RemoveTextTrack(this, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,8 @@ WebVTTListener::OnStopRequest(nsIRequest* aRequest,
|
||||||
nsresult aStatus)
|
nsresult aStatus)
|
||||||
{
|
{
|
||||||
if (mElement->ReadyState() != HTMLTrackElement::ERROR) {
|
if (mElement->ReadyState() != HTMLTrackElement::ERROR) {
|
||||||
mElement->mTrack->SetReadyState(HTMLTrackElement::LOADED);
|
TextTrack* track = mElement->Track();
|
||||||
|
track->SetReadyState(HTMLTrackElement::LOADED);
|
||||||
}
|
}
|
||||||
// Attempt to parse any final data the parser might still have.
|
// Attempt to parse any final data the parser might still have.
|
||||||
mParserWrapper->Flush();
|
mParserWrapper->Flush();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче