diff --git a/dom/media/PeerConnection.js b/dom/media/PeerConnection.js index 3846287bb261..12a6687f7df4 100644 --- a/dom/media/PeerConnection.js +++ b/dom/media/PeerConnection.js @@ -725,49 +725,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 48649ddd715b..abbc50b5138d 100644 --- a/dom/webidl/RTCPeerConnection.webidl +++ b/dom/webidl/RTCPeerConnection.webidl @@ -67,17 +67,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 _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;