Bug 1663736 - Also check mSinks for explicitly removed sinks. r=jib

Differential Revision: https://phabricator.services.mozilla.com/D99463
This commit is contained in:
Andreas Pehrson 2021-01-07 10:15:10 +00:00
Родитель 1c260024db
Коммит 7a80c84f43
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -267,8 +267,8 @@ class MediaStreamTrackSource : public nsISupports {
MOZ_ASSERT(NS_IsMainThread());
for (auto& sink : mSinks.Clone()) {
if (!sink) {
MOZ_ASSERT_UNREACHABLE("Sink was not explicitly removed");
mSinks.RemoveElement(sink);
DebugOnly<bool> removed = mSinks.RemoveElement(sink);
MOZ_ASSERT(!removed, "Sink was not explicitly removed");
continue;
}
sink->PrincipalChanged();
@ -284,8 +284,8 @@ class MediaStreamTrackSource : public nsISupports {
MOZ_ASSERT(NS_IsMainThread());
for (auto& sink : mSinks.Clone()) {
if (!sink) {
MOZ_ASSERT_UNREACHABLE("Sink was not explicitly removed");
mSinks.RemoveElement(sink);
DebugOnly<bool> removed = mSinks.RemoveElement(sink);
MOZ_ASSERT(!removed, "Sink was not explicitly removed");
continue;
}
sink->MutedChanged(aNewState);
@ -300,8 +300,8 @@ class MediaStreamTrackSource : public nsISupports {
MOZ_ASSERT(NS_IsMainThread());
for (auto& sink : mSinks.Clone()) {
if (!sink) {
MOZ_ASSERT_UNREACHABLE("Sink was not explicitly removed");
mSinks.RemoveElement(sink);
DebugOnly<bool> removed = mSinks.RemoveElement(sink);
MOZ_ASSERT(!removed, "Sink was not explicitly removed");
continue;
}
sink->OverrideEnded();