Bug 1391170 - lessen the assertion in AddMediaElementToURITable() so we can move MediaDecoder::GetResource() to private. r=gerald

If AddMediaElementToURITable() is called after the decoder Load failed, mDecoder
will be reset and it is sufficient to assert mDecoder only.

MozReview-Commit-ID: 58WT8zFeiFj
This commit is contained in:
JW Wang
2017-08-17 15:41:22 +08:00
parent c70af60070
commit 60a242f989
5 changed files with 15 additions and 16 deletions

View File

@@ -3693,7 +3693,7 @@ MediaElementTableCount(HTMLMediaElement* aElement, nsIURI* aURI)
void
HTMLMediaElement::AddMediaElementToURITable()
{
NS_ASSERTION(mDecoder && mDecoder->GetResource(), "Call this only with decoder Load called");
NS_ASSERTION(mDecoder, "Call this only with decoder Load called");
NS_ASSERTION(MediaElementTableCount(this, mLoadingSrc) == 0,
"Should not have entry for element in element table before addition");
if (!gElementTable) {