diff options
author | Moonchild <moonchild@palemoon.org> | 2023-10-04 09:19:58 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2023-10-04 09:19:58 +0000 |
commit | a2f69c22f82af2cd980ad613521d7fe11fa306c4 (patch) | |
tree | 29dd73dbf12c65bca9a7bd15518126e37804713d | |
parent | 5d76f359905f10fbd5b4c53ac458e26d22ffe2a1 (diff) | |
parent | 9d69fa3c376c2f5f012093ef340cbf416966ca5f (diff) | |
download | uxp-a2f69c22f82af2cd980ad613521d7fe11fa306c4.tar.gz |
Merge pull request 'No Issue - Remove deprecation errors for obsolete RTCOfferOptions' (#2325) from Basilisk-Dev/UXP-contrib:master into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2325
-rw-r--r-- | dom/media/PeerConnection.js | 43 | ||||
-rw-r--r-- | dom/webidl/RTCPeerConnection.webidl | 11 |
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; |