Bug 1303970 - Part 1: MEDIA_ERR_ABORTED can be returned even if readyState is HAVE_NOTHING. r=jwwang, a=gchang
authorJean-Yves Avenard <jyavenard@mozilla.com>
Tue, 20 Sep 2016 19:36:09 +1000
changeset 357969 f48be812c11381b8a497ca5605c00a72359a263b
parent 357968 81325da0086efea3ddb70a61dc7ee5dd816fb962
child 357970 4ce626bad1bfe6157fc37bd22b8b2d83dfe5d1b5
push id1324
push usermtabara@mozilla.com
push dateMon, 16 Jan 2017 13:07:44 +0000
treeherdermozilla-release@a01c49833940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwwang, gchang
bugs1303970
milestone51.0a2
Bug 1303970 - Part 1: MEDIA_ERR_ABORTED can be returned even if readyState is HAVE_NOTHING. r=jwwang, a=gchang So change assertion accordingly. MozReview-Commit-ID: AuaDlyF0MAL
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -4462,18 +4462,16 @@ void HTMLMediaElement::LoadAborted()
 
 void HTMLMediaElement::Error(uint16_t aErrorCode,
                              const nsACString& aErrorDetails)
 {
   NS_ASSERTION(aErrorCode == MEDIA_ERR_DECODE ||
                aErrorCode == MEDIA_ERR_NETWORK ||
                aErrorCode == MEDIA_ERR_ABORTED,
                "Only use MediaError codes!");
-  NS_ASSERTION(mReadyState > HAVE_NOTHING,
-               "Shouldn't be called when readyState is HAVE_NOTHING");
 
   // Since we have multiple paths calling into DecodeError, e.g.
   // MediaKeys::Terminated and EMEH264Decoder::Error. We should take the 1st
   // one only in order not to fire multiple 'error' events.
   if (mError) {
     return;
   }
   mError = new MediaError(this, aErrorCode, aErrorDetails);