Bug 1321497 - correct the logic of resuming from AudioChannel; r=alwu,jwwang
☠☠ backed out by b0b97ce213be ☠ ☠
authorKaku Kuo <kaku@mozilla.com>
Thu, 01 Dec 2016 16:30:18 +0800
changeset 324938 1c6c9a6c9b16991dc4605aef989f1ae0c8ff8820
parent 324937 4c969c7c1c2221e2e9c3da63b1153ddbaf1378f5
child 324939 ffd7e71624b515b17653a5378d9572afa7aa8759
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersalwu, jwwang
bugs1321497
milestone53.0a1
Bug 1321497 - correct the logic of resuming from AudioChannel; r=alwu,jwwang MozReview-Commit-ID: JxeqdzADlrU
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -765,17 +765,17 @@ private:
 
     NotifyAudioPlaybackChanged(
       AudioChannelService::AudibleChangedReasons::ePauseStateChanged);
   }
 
   void
   Resume()
   {
-    if (!IsSuspended() && mOwner->Paused()) {
+    if (!IsSuspended() || !mOwner->Paused()) {
       MOZ_LOG(AudioChannelService::GetAudioChannelLog(), LogLevel::Debug,
              ("HTMLMediaElement::AudioChannelAgentCallback, ResumeFromAudioChannel, "
               "this = %p, Error : resume without suspended!\n", this));
       return;
     }
 
     SetSuspended(nsISuspendedTypes::NONE_SUSPENDED);
     nsresult rv = mOwner->Play();