Bug 1408523 - Use SyncRunnable instead of Dispatch(...NS_DISPATCH_SYNC) when running on non-nsThreads. r=jib
authorRandell Jesup <rjesup@jesup.org>
Tue, 24 Oct 2017 00:16:29 -0400
changeset 444105 e5b4f7ad5fc4e232dfdcf047c2a8d8f512911c10
parent 444104 67462ac2d7142c01ffab6064738cdf7efbe2c01e
child 444106 50b8043a629c482ce42ff9ac29fb761bd055008a
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib
bugs1408523
milestone58.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 1408523 - Use SyncRunnable instead of Dispatch(...NS_DISPATCH_SYNC) when running on non-nsThreads. r=jib
media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp
--- a/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp
+++ b/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp
@@ -314,23 +314,22 @@ int32_t
 WebrtcGmpVideoEncoder::Encode(const webrtc::VideoFrame& aInputImage,
                               const webrtc::CodecSpecificInfo* aCodecSpecificInfo,
                               const std::vector<webrtc::FrameType>* aFrameTypes)
 {
   MOZ_ASSERT(aInputImage.width() >= 0 && aInputImage.height() >= 0);
   // Would be really nice to avoid this sync dispatch, but it would require a
   // copy of the frame, since it doesn't appear to actually have a refcount.
   // Passing 'this' is safe since this is synchronous.
-  mGMPThread->Dispatch(
+  mozilla::SyncRunnable::DispatchToThread(mGMPThread,
       WrapRunnable(this,
                    &WebrtcGmpVideoEncoder::Encode_g,
                    &aInputImage,
                    aCodecSpecificInfo,
-                   aFrameTypes),
-      NS_DISPATCH_SYNC);
+                   aFrameTypes));
 
   return WEBRTC_VIDEO_CODEC_OK;
 }
 
 void
 WebrtcGmpVideoEncoder::RegetEncoderForResolutionChange(
     uint32_t aWidth,
     uint32_t aHeight,