зеркало из 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)
|
||||
{
|
||||
mReadyState = aState;
|
||||
if (mReadyState == HTMLTrackElement::LOADED ||
|
||||
mReadyState == HTMLTrackElement::ERROR) {
|
||||
if (mMediaElement && (mReadyState == HTMLTrackElement::LOADED ||
|
||||
mReadyState == HTMLTrackElement::ERROR)) {
|
||||
mMediaElement->RemoveTextTrack(this, true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,7 +107,8 @@ WebVTTListener::OnStopRequest(nsIRequest* aRequest,
|
|||
nsresult aStatus)
|
||||
{
|
||||
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.
|
||||
mParserWrapper->Flush();
|
||||
|
|
Загрузка…
Ссылка в новой задаче