Backed out changeset 37b877eb0834 (bug 1163597) for mochitest bustage
authorWes Kocher <wkocher@mozilla.com>
Mon, 11 May 2015 13:17:51 -0700
changeset 243385 944c1568d8d830a0584a5843dc10378ed41ba322
parent 243384 0a2cfe0345f0220c5b9102a7bfd7ffe186fab105
child 243386 940bf097d9cfdeca79c621666579f12845d77d7e
push id28738
push usercbook@mozilla.com
push dateTue, 12 May 2015 14:11:31 +0000
treeherdermozilla-central@bedce1b405a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1163597
milestone40.0a1
backs out37b877eb0834147f5437892af25482cc5474aba6
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
Backed out changeset 37b877eb0834 (bug 1163597) for mochitest bustage
dom/media/MediaStreamGraph.cpp
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -909,39 +909,23 @@ MediaStreamGraphImpl::MarkStreamBlocking
 }
 
 void
 MediaStreamGraphImpl::RecomputeBlockingAt(const nsTArray<MediaStream*>& aStreams,
                                           GraphTime aTime,
                                           GraphTime aEndBlockingDecisions,
                                           GraphTime* aEnd)
 {
-  class MOZ_STACK_CLASS AfterLoop
-  {
-  public:
-    AfterLoop(MediaStream* aStream, GraphTime& aTime)
-      : mStream(aStream)
-      , mTime(aTime)
-    {}
-
-    ~AfterLoop()
-    {
-      mStream->mBlocked.SetAtAndAfter(mTime, mStream->mBlockInThisPhase);
-    }
-
-  private:
-    MediaStream* mStream;
-    GraphTime& mTime;
-  };
+  for (uint32_t i = 0; i < aStreams.Length(); ++i) {
+    MediaStream* stream = aStreams[i];
+    stream->mBlockInThisPhase = false;
+  }
 
   for (uint32_t i = 0; i < aStreams.Length(); ++i) {
     MediaStream* stream = aStreams[i];
-    stream->mBlockInThisPhase = false;
-
-    AfterLoop al(stream, aTime);
 
     if (stream->mFinished) {
       GraphTime endTime = StreamTimeToGraphTime(stream,
          stream->GetStreamBuffer().GetAllTracksEnd());
       if (endTime <= aTime) {
         STREAM_LOG(PR_LOG_DEBUG+1, ("MediaStream %p is blocked due to being finished", stream));
         // We'll block indefinitely
         MarkStreamBlocking(stream);
@@ -967,18 +951,22 @@ MediaStreamGraphImpl::RecomputeBlockingA
     bool underrun = WillUnderrun(stream, aTime, aEndBlockingDecisions, aEnd);
     if (underrun) {
       // We'll block indefinitely
       MarkStreamBlocking(stream);
       *aEnd = std::min(*aEnd, aEndBlockingDecisions);
       continue;
     }
   }
-
   NS_ASSERTION(*aEnd > aTime, "Failed to advance!");
+
+  for (uint32_t i = 0; i < aStreams.Length(); ++i) {
+    MediaStream* stream = aStreams[i];
+    stream->mBlocked.SetAtAndAfter(aTime, stream->mBlockInThisPhase);
+  }
 }
 
 void
 MediaStreamGraphImpl::NotifyHasCurrentData(MediaStream* aStream)
 {
   if (!aStream->mNotifiedHasCurrentData && aStream->mHasCurrentData) {
     for (uint32_t j = 0; j < aStream->mListeners.Length(); ++j) {
       MediaStreamListener* l = aStream->mListeners[j];