зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1351053. P2 - fix data race in accessing mAudioDemuxer/mVideoDemuxer. r=jya
1. http://searchfox.org/mozilla-central/rev/944f87c575e8a0bcefc1ed8efff10b34cf7a5169/dom/media/MediaFormatReader.cpp#755 mAudioDemuxer is modified on the task queue thread of MFR in Shutdown() called by MFR::Shutdown(). 2. http://searchfox.org/mozilla-central/rev/944f87c575e8a0bcefc1ed8efff10b34cf7a5169/dom/media/MediaFormatReader.cpp#1082 mAudioDemuxer is read on the task queue thread of DemuxerProxy in DemuxerProxy::NotifyDataArrived(). MozReview-Commit-ID: 8qLAzNKjuzb --HG-- extra : rebase_source : f39acc8b91dfc8a5480ddca724254de128cff22b extra : source : 76544a99e0651667e5331c5d93c2cd335f61dd46
This commit is contained in:
Родитель
bd27d7c7ff
Коммит
acc023483b
|
@ -751,8 +751,6 @@ public:
|
|||
|
||||
RefPtr<ShutdownPromise> Shutdown()
|
||||
{
|
||||
mData->mAudioDemuxer = nullptr;
|
||||
mData->mVideoDemuxer = nullptr;
|
||||
RefPtr<Data> data = mData.forget();
|
||||
return InvokeAsync(mTaskQueue, __func__, [data]() {
|
||||
// We need to clear our reference to the demuxer now. So that in the event
|
||||
|
@ -760,6 +758,8 @@ public:
|
|||
// mediasource demuxer that is waiting on more data, it will force the
|
||||
// init promise to be rejected.
|
||||
data->mDemuxer = nullptr;
|
||||
data->mAudioDemuxer = nullptr;
|
||||
data->mVideoDemuxer = nullptr;
|
||||
return ShutdownPromise::CreateAndResolve(true, __func__);
|
||||
});
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче