summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBasilisk-Dev <basiliskdev@protonmail.com>2023-10-09 17:07:05 -0400
committerBasilisk-Dev <basiliskdev@protonmail.com>2023-10-09 17:07:05 -0400
commit9bee3a8b7250fe33f50eca53737f8bec71d69d84 (patch)
tree95e74a0aaf5cdb42c2d9b8f36dcf963ffa908c15
parentc8218f73b7a1f2dcc8b2a83707dcfd9d38e741d4 (diff)
downloaduxp-9bee3a8b7250fe33f50eca53737f8bec71d69d84.tar.gz
Issue #2332 - Have createOffer/Answer resolve with dictionaries
Backport of https://bugzilla.mozilla.org/show_bug.cgi?id=1263312 part 4
-rw-r--r--dom/media/PeerConnection.js13
1 files changed, 4 insertions, 9 deletions
diff --git a/dom/media/PeerConnection.js b/dom/media/PeerConnection.js
index 712c2b0d13..e4612f8316 100644
--- a/dom/media/PeerConnection.js
+++ b/dom/media/PeerConnection.js
@@ -739,8 +739,7 @@ RTCPeerConnection.prototype = {
this._impl.createOffer(options);
}));
p = this._addIdentityAssertion(p, origin);
- return p.then(
- sdp => new this._win.RTCSessionDescription({ type: "offer", sdp: sdp }));
+ return p.then(sdp => Cu.cloneInto({ type: "offer", sdp: sdp }, this._win));
});
});
},
@@ -774,9 +773,7 @@ RTCPeerConnection.prototype = {
this._impl.createAnswer();
}));
p = this._addIdentityAssertion(p, origin);
- return p.then(sdp => {
- return new this._win.RTCSessionDescription({ type: "answer", sdp: sdp });
- });
+ return p.then(sdp => Cu.cloneInto({ type: "answer", sdp: sdp }, this._win));
});
});
},
@@ -1137,8 +1134,7 @@ RTCPeerConnection.prototype = {
return null;
}
- return new this._win.RTCSessionDescription({ type: this._localType,
- sdp: sdp });
+ return new this._win.RTCSessionDescription({ type: this._localType, sdp });
},
get remoteDescription() {
@@ -1147,8 +1143,7 @@ RTCPeerConnection.prototype = {
if (sdp.length == 0) {
return null;
}
- return new this._win.RTCSessionDescription({ type: this._remoteType,
- sdp: sdp });
+ return new this._win.RTCSessionDescription({ type: this._remoteType, sdp });
},
get peerIdentity() { return this._peerIdentity; },