зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1332845 - Remove listeners before other cleanup in MediaRecorder. r=jesup
There was an indirect race from destroying this MediaInputPort before removing the direct listener. MozReview-Commit-ID: 7rPzsLL4EvG --HG-- extra : rebase_source : 6271778593079609119153ce8b81587a9188d8ba
This commit is contained in:
Родитель
b38be6eedc
Коммит
5835686871
|
@ -825,11 +825,6 @@ private:
|
|||
}
|
||||
mInputStream = nullptr;
|
||||
}
|
||||
for (RefPtr<MediaInputPort>& inputPort : mInputPorts) {
|
||||
MOZ_ASSERT(inputPort);
|
||||
inputPort->Destroy();
|
||||
}
|
||||
mInputPorts.Clear();
|
||||
|
||||
if (mTrackUnionStream) {
|
||||
if (mEncoder) {
|
||||
|
@ -855,6 +850,12 @@ private:
|
|||
mTrackUnionStream = nullptr;
|
||||
}
|
||||
|
||||
for (RefPtr<MediaInputPort>& inputPort : mInputPorts) {
|
||||
MOZ_ASSERT(inputPort);
|
||||
inputPort->Destroy();
|
||||
}
|
||||
mInputPorts.Clear();
|
||||
|
||||
if (mMediaStream) {
|
||||
mMediaStream->UnregisterTrackListener(this);
|
||||
mMediaStream = nullptr;
|
||||
|
|
Загрузка…
Ссылка в новой задаче