Bug 1278452 - Remove unnecessary null checks in dom/media/. r=kamidphish.

|audio| and |video| are both dereferenced beforehand.

--HG--
extra : rebase_source : a91f5cf039f5e3d54a91d39eb4527a13e83ced7c
This commit is contained in:
Nicholas Nethercote 2016-06-07 14:50:39 +10:00
parent 65989a693d
commit e8ac055da1

View File

@ -598,9 +598,7 @@ MediaDecoderStateMachine::OnAudioDecoded(MediaData* aAudioSample)
mDecodedAudioEndTime = std::max(audio->GetEndTime(), mDecodedAudioEndTime);
SAMPLE_LOG("OnAudioDecoded [%lld,%lld] disc=%d",
(audio ? audio->mTime : -1),
(audio ? audio->GetEndTime() : -1),
(audio ? audio->mDiscontinuity : 0));
audio->mTime, audio->GetEndTime(), audio->mDiscontinuity);
switch (mState) {
case DECODER_STATE_BUFFERING: {
@ -788,9 +786,7 @@ MediaDecoderStateMachine::OnVideoDecoded(MediaData* aVideoSample,
mDecodedVideoEndTime = std::max(mDecodedVideoEndTime, video->GetEndTime());
SAMPLE_LOG("OnVideoDecoded [%lld,%lld] disc=%d",
(video ? video->mTime : -1),
(video ? video->GetEndTime() : -1),
(video ? video->mDiscontinuity : 0));
video->mTime, video->GetEndTime(), video->mDiscontinuity);
switch (mState) {
case DECODER_STATE_BUFFERING: {