mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 02:05:42 +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
301e6c847e
commit
de0958d2f0
@ -586,10 +586,11 @@ class RTCPeerConnection {
|
||||
|
||||
// This implements the fairly common "Queue a task" logic
|
||||
async _queueTaskWithClosedCheck(func) {
|
||||
const 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