Bug 1542021 - Part 1: Check whether transceiver is stopped in removeTrack, and bail if so. r=jib
authorByron Campen [:bwc] <docfaraday@gmail.com>
Fri, 05 Apr 2019 15:50:37 +0000
changeset 468368 ca9b2ec29d981fbbc636bcea28314ba2717b75c5
parent 468367 57ef4fc9dee88f2709448fe6d525735c19d2e503
child 468369 e7003b05592a69c0fe6e2ee1aee41111abba504a
push id35835
push useraciure@mozilla.com
push dateMon, 08 Apr 2019 19:00:29 +0000
treeherdermozilla-central@40456af7da1c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib
bugs1542021
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1542021 - Part 1: Check whether transceiver is stopped in removeTrack, and bail if so. r=jib Depends on D26314 Differential Revision: https://phabricator.services.mozilla.com/D26315
dom/media/PeerConnection.jsm
--- a/dom/media/PeerConnection.jsm
+++ b/dom/media/PeerConnection.jsm
@@ -1168,17 +1168,18 @@ class RTCPeerConnection {
   }
 
   removeTrack(sender) {
     this._checkClosed();
 
     sender.checkWasCreatedByPc(this.__DOM_IMPL__);
 
     let transceiver =
-      this._transceivers.find(transceiver => transceiver.sender == sender);
+      this._transceivers.find(transceiver =>
+        !transceiver.stopped && transceiver.sender == sender);
 
     // If the transceiver was removed due to rollback, let it slide.
     if (!transceiver || !sender.track) {
       return;
     }
 
     sender.setTrack(null);
     if (transceiver.direction == "sendrecv") {