bug 1116382 no need to check IsMediaSourceURI(mLoadingSrc) once mMediaSource has been set r=bholley
authorKarl Tomlinson <karlt+@karlt.net>
Thu, 28 May 2015 14:49:23 +1200
changeset 247301 76bc62c51e9edd0bd79a787ce8be1d3152d8e038
parent 247300 dd80106d7465a6ea94de9a3074d35a4959d1cc3c
child 247302 9117150ca7e6072d24f523889c4347868d1d78ad
push id60669
push userktomlinson@mozilla.com
push dateFri, 05 Jun 2015 08:08:50 +0000
treeherdermozilla-inbound@94fcc63014b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs1116382
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1116382 no need to check IsMediaSourceURI(mLoadingSrc) once mMediaSource has been set r=bholley
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -1077,17 +1077,17 @@ void HTMLMediaElement::UpdatePreloadActi
   {
     nextAction = HTMLMediaElement::PRELOAD_ENOUGH;
   } else {
     // Find the appropriate preload action by looking at the attribute.
     const nsAttrValue* val = mAttrsAndChildren.GetAttr(nsGkAtoms::preload,
                                                        kNameSpaceID_None);
     // MSE doesn't work if preload is none, so it ignores the pref when src is
     // from MSE.
-    uint32_t preloadDefault = (mLoadingSrc && IsMediaSourceURI(mLoadingSrc)) ?
+    uint32_t preloadDefault = mMediaSource ?
                               HTMLMediaElement::PRELOAD_ATTR_METADATA :
                               Preferences::GetInt("media.preload.default",
                                                   HTMLMediaElement::PRELOAD_ATTR_METADATA);
     uint32_t preloadAuto =
       Preferences::GetInt("media.preload.auto",
                           HTMLMediaElement::PRELOAD_ENOUGH);
     if (!val) {
       // Attribute is not set. Use the preload action specified by the
@@ -3430,17 +3430,17 @@ void HTMLMediaElement::CheckProgress(boo
         ChangeDelayLoadStatus(true);
       }
     }
   }
 
   if (now - mDataTime >= TimeDuration::FromMilliseconds(STALL_MS)) {
     DispatchAsyncEvent(NS_LITERAL_STRING("stalled"));
 
-    if (mLoadingSrc && IsMediaSourceURI(mLoadingSrc)) {
+    if (mMediaSource) {
       ChangeDelayLoadStatus(false);
     }
 
     NS_ASSERTION(mProgressTimer, "detected stalled without timer");
     // Stop timer events, which prevents repeated stalled events until there
     // is more progress.
     StopProgress();
   }