mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 02:35:41 +00:00
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 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
d79320592d
commit
d5bcd560b9
@ -586,10 +586,11 @@ class RTCPeerConnection {
|
||||
|
||||
// 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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user