Bug 1228226 - Backed out changeset 2553c3b5ba89.
authorPaul Adenot <paul@paul.cx>
Fri, 13 Jan 2017 16:15:27 +0100
changeset 374358 3ea2d688da6bc524195633d81e2ff00d6bde0fa5
parent 374357 80676b857f48fb1b16850ca81dde4fd4a4efd8b3
child 374359 d7e148db2e85f74bef3680e2ad1797c1af5d28f3
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1228226, 1329082
milestone53.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 1228226 - Backed out changeset 2553c3b5ba89. This causes a number of issues, like bug 1329082, where we don't swap the message queues of the MSG where we should, and blows up an assert in debug. MozReview-Commit-ID: 2I3IjfK8L8r
dom/media/MediaStreamGraph.cpp
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -1251,16 +1251,18 @@ void
 MediaStreamGraphImpl::UpdateGraph(GraphTime aEndBlockingDecisions)
 {
   MOZ_ASSERT(aEndBlockingDecisions >= mProcessedTime);
   // The next state computed time can be the same as the previous: it
   // means the driver would be have been blocking indefinitly, but the graph has
   // been woken up right after having been to sleep.
   MOZ_ASSERT(aEndBlockingDecisions >= mStateComputedTime);
 
+  UpdateStreamOrder();
+
   bool ensureNextIteration = false;
 
   // Grab pending stream input and compute blocking time
   for (MediaStream* stream : mStreams) {
     if (SourceMediaStream* is = stream->AsSourceStream()) {
       ExtractPendingInput(is, aEndBlockingDecisions, &ensureNextIteration);
     }
 
@@ -1401,32 +1403,17 @@ MediaStreamGraphImpl::UpdateMainThreadSt
 bool
 MediaStreamGraphImpl::OneIteration(GraphTime aStateEnd)
 {
   WebCore::DenormalDisabler disabler;
 
   // Process graph message from the main thread for this iteration.
   RunMessagesInQueue();
 
-  UpdateStreamOrder();
-
-  bool switchingFromSystemClockDriver = false;
-  {
-    MonitorAutoLock mon(mMonitor);
-    switchingFromSystemClockDriver = CurrentDriver()->AsSystemClockDriver() && CurrentDriver()->Switching();
-  }
-
   GraphTime stateEnd = std::min(aStateEnd, mEndTime);
-
-  // See Bug 1228226 - If we're switching from the SystemClockDriver, we
-  // don't want time to advance until after the switch.
-  if (switchingFromSystemClockDriver) {
-    stateEnd = mProcessedTime;
-  }
-
   UpdateGraph(stateEnd);
 
   mStateComputedTime = stateEnd;
 
   Process();
 
   GraphTime oldProcessedTime = mProcessedTime;
   mProcessedTime = stateEnd;