Bug 988760 - Account extra time since blocking correctly. r=karlt, a=1.3+
authorGabriele Svelto <gsvelto@mozilla.com>
Mon, 07 Apr 2014 13:20:57 +0200
changeset 192010 0de33d74936a85aca1163e3147c6b03fdb1e93a4
parent 192009 d42f2a9973d71cdbad89b2a6554ad88b1da411d1
child 192011 b7feb91cf1d843a359bb8513cc6fe7a8162bf8b7
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt, 1
bugs988760
milestone30.0a2
Bug 988760 - Account extra time since blocking correctly. r=karlt, a=1.3+
content/media/webaudio/AudioDestinationNode.cpp
--- a/content/media/webaudio/AudioDestinationNode.cpp
+++ b/content/media/webaudio/AudioDestinationNode.cpp
@@ -563,24 +563,24 @@ AudioDestinationNode::SetIsOnlyNodeForCo
     // show up in its result buffer. Also, we would get confused by adding
     // ExtraCurrentTime before StartRendering has even been called.
     return;
   }
 
   if (aIsOnlyNode) {
     mStream->ChangeExplicitBlockerCount(1);
     mStartedBlockingDueToBeingOnlyNode = TimeStamp::Now();
-    mExtraCurrentTimeSinceLastStartedBlocking = 0;
     // Don't do an update of mExtraCurrentTimeSinceLastStartedBlocking until the next stable state.
     mExtraCurrentTimeUpdatedSinceLastStableState = true;
     ScheduleStableStateNotification();
   } else {
     // Force update of mExtraCurrentTimeSinceLastStartedBlocking if necessary
     ExtraCurrentTime();
     mExtraCurrentTime += mExtraCurrentTimeSinceLastStartedBlocking;
+    mExtraCurrentTimeSinceLastStartedBlocking = 0;
     mStream->ChangeExplicitBlockerCount(-1);
     mStartedBlockingDueToBeingOnlyNode = TimeStamp();
   }
 }
 
 }
 
 }