Closed Bug 1421958 Opened 7 years ago Closed 7 years ago

OfferToReceiveVideo and OfferToReceiveAudio should be of type Boolean not Long

Categories

(Core :: WebRTC, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: posidron, Assigned: dminor)

References

Details

Attachments

(1 file)

The W3C spec defines |offerToReceiveVideo| and |offerToReceiveAudio| as "Boolean".

https://w3c.github.io/webrtc-pc/#dom-rtcofferoptions-offertoreceiveaudio


In our implementation those keys are defined as "Long".

https://searchfox.org/mozilla-central/rev/be78e6ea9b10b1f5b2b3b013f01d86e1062abb2b/dom/webidl/RTCPeerConnection.webidl#70



To illustrate the problem:

o[0] = new RTCPeerConnection({iceServers: [{"urls":"stun:23.21.150.121"}]})
o[0].createOffer({offerToReceiveVideo: 2147483647, offerToReceiveAudio: 2147483647})

or with negative values:

o[0].createOffer({offerToReceiveVideo: -1, offerToReceiveAudio: -1})


Both versions lead to an OOM condition.
Rank: 15
Priority: -- → P2
Assignee: nobody → dminor
Status: NEW → ASSIGNED
Attachment #8933712 - Flags: review?(jib)
Attachment #8933712 - Flags: review?(bugs)
Attachment #8933712 - Flags: review?(bugs) → review+
Attachment #8933712 - Flags: review?(jib) → review+
Pushed by dminor@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f4b92d1566a6
OfferToReceiveVideo and OfferToReceiveAudio should be of type Boolean not Long; r=smaug,jib
https://hg.mozilla.org/mozilla-central/rev/f4b92d1566a6
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: