Bug 1543427 - Part 1: Do not prevent rollback from disassociating a stopped transceiver. r=mjf

Differential Revision: https://phabricator.services.mozilla.com/D26934

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Byron Campen [:bwc] 2019-04-16 14:53:03 +00:00
Родитель dfb7f83e12
Коммит c8b347cbbe
1 изменённых файлов: 7 добавлений и 5 удалений

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

@ -68,10 +68,9 @@ class JsepTransceiver {
}
mRecvTrack = oldTransceiver.mRecvTrack;
// stop() caused by a disabled m-section in a remote offer cannot be
// rolled back.
if (!IsStopped()) {
mMid = oldTransceiver.mMid;
// Don't allow rollback to re-associate a transceiver.
if (!oldTransceiver.IsAssociated()) {
Disassociate();
}
}
@ -99,7 +98,10 @@ class JsepTransceiver {
mLevel = level;
}
void ClearLevel() { mLevel = SIZE_MAX; }
void ClearLevel() {
MOZ_ASSERT(!IsAssociated());
mLevel = SIZE_MAX;
}
size_t GetLevel() const {
MOZ_ASSERT(HasLevel());