Bug 1505494 - remove redundant codes. r=cpearce
authoralwu <alwu@mozilla.com>
Mon, 12 Nov 2018 17:39:53 +0000
changeset 505115 65987ae1dfca
parent 505114 fe1869606e94
child 505116 ab2cc746e451
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1505494
milestone65.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 1505494 - remove redundant codes. r=cpearce There are two exactly same codes here, remove one of them. Differential Revision: https://phabricator.services.mozilla.com/D11502
dom/media/AutoplayPolicy.cpp
--- a/dom/media/AutoplayPolicy.cpp
+++ b/dom/media/AutoplayPolicy.cpp
@@ -162,22 +162,16 @@ IsMediaElementAllowedToPlay(const HTMLMe
   }
 
   if (!aElement.HasAudio() &&
       aElement.ReadyState() >= HTMLMediaElement_Binding::HAVE_METADATA) {
     AUTOPLAY_LOG("Allow media %p without audio track to autoplay", &aElement);
     return true;
   }
 
-  if (!aElement.HasAudio() &&
-      aElement.ReadyState() >= HTMLMediaElement_Binding::HAVE_METADATA) {
-    AUTOPLAY_LOG("Allow media without audio track %p to autoplay\n", &aElement);
-    return true;
-  }
-
   return false;
 }
 
 /* static */ bool
 AutoplayPolicy::WouldBeAllowedToPlayIfAutoplayDisabled(const HTMLMediaElement& aElement)
 {
   return IsMediaElementAllowedToPlay(aElement);
 }