Bug 1528323 - Part 1.1: Fix bug in _queueWithClosedCheck where |this| did not refer to the PeerConnection. r=jib
☠☠ backed out by bd76311c316a ☠ ☠
authorByron Campen [:bwc] <docfaraday@gmail.com>
Mon, 25 Feb 2019 15:08:35 +0000
changeset 519334 be1db93b9ba737fe549c10cd7d762d0cec87da10
parent 519333 e1b06db7e2c61a57616a14fb4e0bbf4cb62149ac
child 519335 4ec8d35bbefce1c9dc0feccd1165933f831c855f
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib
bugs1528323
milestone67.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 1528323 - Part 1.1: Fix bug in _queueWithClosedCheck where |this| did not refer to the PeerConnection. r=jib Differential Revision: https://phabricator.services.mozilla.com/D21015
dom/media/PeerConnection.jsm
--- a/dom/media/PeerConnection.jsm
+++ b/dom/media/PeerConnection.jsm
@@ -581,20 +581,21 @@ class RTCPeerConnection {
       wrapCallback(onSucc)(await func());
     } catch (e) {
       wrapCallback(onErr)(e);
     }
   }
 
   // This implements the fairly common "Queue a task" logic
   async _queueTaskWithClosedCheck(func) {
+    let pc = this;
     return new this._win.Promise((resolve,reject) => {
       Services.tm.dispatchToMainThread({ run() {
         try {
-          if (!this._closed) {
+          if (!pc._closed) {
             func();
             resolve();
           }
         } catch (e) {
           reject(e);
         }
       }});
     });