зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1567951: Add implicit rollback in setRemoteDescription(offer). r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D38889 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
e915ec88ec
Коммит
5bce336f55
|
@ -1224,8 +1224,18 @@ class RTCPeerConnection {
|
|||
let origin = Cu.getWebIDLCallerPrincipal().origin;
|
||||
|
||||
return this._chain(async () => {
|
||||
let haveSetRemote = (async () => {
|
||||
const haveSetRemote = (async () => {
|
||||
await this._getPermission();
|
||||
if (type == "offer" && this.signalingState == "have-local-offer") {
|
||||
await new Promise((resolve, reject) => {
|
||||
this._onSetLocalDescriptionSuccess = resolve;
|
||||
this._onSetLocalDescriptionFailure = reject;
|
||||
this._impl.setLocalDescription(
|
||||
Ci.IPeerConnection.kActionRollback,
|
||||
""
|
||||
);
|
||||
});
|
||||
}
|
||||
await new Promise((resolve, reject) => {
|
||||
this._onSetRemoteDescriptionSuccess = resolve;
|
||||
this._onSetRemoteDescriptionFailure = reject;
|
||||
|
|
Загрузка…
Ссылка в новой задаче