summaryrefslogtreecommitdiff
path: root/dom
diff options
context:
space:
mode:
authorBasilisk-Dev <basiliskdev@protonmail.com>2023-10-03 16:55:28 -0400
committerBasilisk-Dev <basiliskdev@protonmail.com>2023-10-03 16:55:28 -0400
commit9d69fa3c376c2f5f012093ef340cbf416966ca5f (patch)
tree29dd73dbf12c65bca9a7bd15518126e37804713d /dom
parent5d76f359905f10fbd5b4c53ac458e26d22ffe2a1 (diff)
downloaduxp-9d69fa3c376c2f5f012093ef340cbf416966ca5f.tar.gz
No Issue - Remove deprecation errors for obsolete RTCOfferOptions
Backport of https://bugzilla.mozilla.org/show_bug.cgi?id=1197021
Diffstat (limited to 'dom')
-rw-r--r--dom/media/PeerConnection.js43
-rw-r--r--dom/webidl/RTCPeerConnection.webidl11
2 files changed, 0 insertions, 54 deletions
diff --git a/dom/media/PeerConnection.js b/dom/media/PeerConnection.js
index 77b7a58980..700e371364 100644
--- a/dom/media/PeerConnection.js
+++ b/dom/media/PeerConnection.js
@@ -702,49 +702,6 @@ RTCPeerConnection.prototype = {
options = optionsOrOnSuccess;
}
return this._legacyCatchAndCloseGuard(onSuccess, onError, () => {
- // TODO: Remove error on constraint-like RTCOptions next cycle (1197021).
- // Note that webidl bindings make o.mandatory implicit but not o.optional.
- function convertLegacyOptions(o) {
- // Detect (mandatory OR optional) AND no other top-level members.
- let lcy = ((o.mandatory && Object.keys(o.mandatory).length) || o.optional) &&
- Object.keys(o).length == (o.mandatory? 1 : 0) + (o.optional? 1 : 0);
- if (!lcy) {
- return false;
- }
- let old = o.mandatory || {};
- if (o.mandatory) {
- delete o.mandatory;
- }
- if (o.optional) {
- o.optional.forEach(one => {
- // The old spec had optional as an array of objects w/1 attribute each.
- // Assumes our JS-webidl bindings only populate passed-in properties.
- let key = Object.keys(one)[0];
- if (key && old[key] === undefined) {
- old[key] = one[key];
- }
- });
- delete o.optional;
- }
- o.offerToReceiveAudio = old.OfferToReceiveAudio;
- o.offerToReceiveVideo = old.OfferToReceiveVideo;
- o.mozDontOfferDataChannel = old.MozDontOfferDataChannel;
- o.mozBundleOnly = old.MozBundleOnly;
- Object.keys(o).forEach(k => {
- if (o[k] === undefined) {
- delete o[k];
- }
- });
- return true;
- }
-
- if (options && convertLegacyOptions(options)) {
- this.logError(
- "Mandatory/optional in createOffer options no longer works! Use " +
- JSON.stringify(options) + " instead (note the case difference)!");
- options = {};
- }
-
let origin = Cu.getWebIDLCallerPrincipal().origin;
return this._chain(() => {
let p = Promise.all([this.getPermission(), this._certificateReady])
diff --git a/dom/webidl/RTCPeerConnection.webidl b/dom/webidl/RTCPeerConnection.webidl
index 6fb4194c36..7ec5cc797b 100644
--- a/dom/webidl/RTCPeerConnection.webidl
+++ b/dom/webidl/RTCPeerConnection.webidl
@@ -66,17 +66,6 @@ dictionary RTCOfferOptions : RTCOfferAnswerOptions {
// Mozilla proprietary options (at risk: Bug 1196974)
boolean mozDontOfferDataChannel;
boolean mozBundleOnly;
-
- // TODO: Remove old constraint-like RTCOptions support soon (Bug 1064223).
- DeprecatedRTCOfferOptionsSet mandatory;
- sequence<DeprecatedRTCOfferOptionsSet> _optional;
-};
-
-dictionary DeprecatedRTCOfferOptionsSet {
- boolean OfferToReceiveAudio; // Note the uppercase 'O'
- boolean OfferToReceiveVideo; // Note the uppercase 'O'
- boolean MozDontOfferDataChannel; // Note the uppercase 'M'
- boolean MozBundleOnly; // Note the uppercase 'M'
};
interface RTCDataChannel;