Bug 1361944. P1 - add a crash test. r=cpearce

The crash happens when:
1. there are multiple <source> children.
2. decode error happens on the 1st child.

MozReview-Commit-ID: 60UXaQ475Nh
This commit is contained in:
JW Wang
2017-05-04 14:23:23 +08:00
parent 1857e3bb8e
commit fcfcc3c80c
5 changed files with 63 additions and 2 deletions

View File

@@ -4580,8 +4580,8 @@ nsresult HTMLMediaElement::InitializeDecoderAsClone(MediaDecoder* aOriginal)
nsresult HTMLMediaElement::InitializeDecoderForChannel(nsIChannel* aChannel,
nsIStreamListener** aListener)
{
NS_ASSERTION(mLoadingSrc, "mLoadingSrc must already be set");
NS_ASSERTION(mDecoder == nullptr, "Shouldn't have a decoder");
MOZ_DIAGNOSTIC_ASSERT(mLoadingSrc, "mLoadingSrc must already be set");
MOZ_DIAGNOSTIC_ASSERT(!mDecoder, "Shouldn't have a decoder");
nsAutoCString mimeType;