Backed out changeset 6a4e68222995 (bug 1141781) for mochitest crashes/asserts.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 18 Mar 2015 15:31:05 -0400
changeset 250426 6a9120be7216
parent 250425 067f83e99f66
child 250427 bd028b4c3b95
push id4584
push userryanvm@gmail.com
push date2015-03-18 19:32 +0000
treeherdermozilla-beta@6a9120be7216 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1141781
milestone37.0
backs out6a4e68222995
Backed out changeset 6a4e68222995 (bug 1141781) for mochitest crashes/asserts.
dom/media/MediaStreamGraph.cpp
media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -1071,33 +1071,16 @@ SetImageToBlackPixel(PlanarYCbCrImage* a
   data.mYChannel = blackPixel;
   data.mCbChannel = blackPixel + 1;
   data.mCrChannel = blackPixel + 2;
   data.mYStride = data.mCbCrStride = 1;
   data.mPicSize = data.mYSize = data.mCbCrSize = IntSize(1, 1);
   aImage->SetData(data);
 }
 
-class VideoFrameContainerInvalidateRunnable : public nsRunnable {
-public:
-  explicit VideoFrameContainerInvalidateRunnable(VideoFrameContainer* aVideoFrameContainer)
-    : mVideoFrameContainer(aVideoFrameContainer)
-  {}
-  NS_IMETHOD Run()
-  {
-    MOZ_ASSERT(NS_IsMainThread());
-
-    mVideoFrameContainer->Invalidate();
-
-    return NS_OK;
-  }
-private:
-  nsRefPtr<VideoFrameContainer> mVideoFrameContainer;
-};
-
 void
 MediaStreamGraphImpl::PlayVideo(MediaStream* aStream)
 {
   MOZ_ASSERT(mRealtime, "Should only attempt to play video in realtime mode");
 
   if (aStream->mVideoOutputs.IsEmpty())
     return;
 
@@ -1151,17 +1134,17 @@ MediaStreamGraphImpl::PlayVideo(MediaStr
       output->SetCurrentFrame(frame->GetIntrinsicSize(), image,
                               targetTime);
     } else {
       output->SetCurrentFrame(frame->GetIntrinsicSize(), frame->GetImage(),
                               targetTime);
     }
 
     nsCOMPtr<nsIRunnable> event =
-      new VideoFrameContainerInvalidateRunnable(output);
+      NS_NewRunnableMethod(output, &VideoFrameContainer::Invalidate);
     DispatchToMainThreadAfterStreamStateUpdate(event.forget());
   }
   if (!aStream->mNotifiedFinished) {
     aStream->mLastPlayedVideoFrame = *frame;
   }
 }
 
 bool
--- a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp
+++ b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp
@@ -562,22 +562,22 @@ void MediaPipelineTransmit::AttachToTrac
 
   // TODO(ekr@rtfm.com): Check for errors
   MOZ_MTLOG(ML_DEBUG, "Attaching pipeline to stream "
             << static_cast<void *>(stream_) << " conduit type=" <<
             (conduit_->type() == MediaSessionConduit::AUDIO ?"audio":"video"));
 
   stream_->AddListener(listener_);
 
- // // Is this a gUM mediastream?  If so, also register the Listener directly with
- // // the SourceMediaStream that's attached to the TrackUnion so we can get direct
- // // unqueued (and not resampled) data
- // if (domstream_->AddDirectListener(listener_)) {
- //   listener_->direct_connect_ = true;
- // }
+  // Is this a gUM mediastream?  If so, also register the Listener directly with
+  // the SourceMediaStream that's attached to the TrackUnion so we can get direct
+  // unqueued (and not resampled) data
+  if (domstream_->AddDirectListener(listener_)) {
+    listener_->direct_connect_ = true;
+  }
 
 #ifndef MOZILLA_INTERNAL_API
   // this enables the unit tests that can't fiddle with principals and the like
   listener_->SetEnabled(true);
 #endif
 }
 
 #ifdef MOZILLA_INTERNAL_API