Bug 1378316. P2 - dispatch MediaDecoderReader::NotifyDataArrived explicitly instead of using MediaEventSource.
MozReview-Commit-ID: AM3CjQ8LoTv
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -1378,17 +1378,20 @@ void MediaDecoder::AddSizeOfResources(Re
}
}
void
MediaDecoder::NotifyDataArrivedInternal()
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_DIAGNOSTIC_ASSERT(!IsShutdown());
- mDataArrivedEvent.Notify();
+ mReader->OwnerThread()->Dispatch(
+ NewRunnableMethod("MediaDecoderReader::NotifyDataArrived",
+ mReader.get(),
+ &MediaDecoderReader::NotifyDataArrived));
}
void
MediaDecoder::NotifyDataArrived()
{
NotifyDataArrivedInternal();
DownloadProgressed();
}