mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 23:08:39 +09:00
Bug 1464079 - Bring ICE connection state change callback up to spec. r=jib, a=RyanVM
This commit is contained in:
parent
e659309611
commit
03766e63da
1 changed files with 12 additions and 0 deletions
|
|
@ -516,6 +516,18 @@ RTCPeerConnection.prototype = {
|
|||
};
|
||||
},
|
||||
|
||||
// This implements the fairly common "Queue a task" logic
|
||||
async _queueTaskWithClosedCheck(func) {
|
||||
return new Promise(resolve => {
|
||||
Services.tm.mainThread.dispatch({ run() {
|
||||
if (!this._closed) {
|
||||
func();
|
||||
resolve();
|
||||
}
|
||||
}}, Ci.nsIThread.DISPATCH_NORMAL);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* An RTCConfiguration may look like this:
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue