Open
Bug 1316320
Opened 8 years ago
Updated 2 years ago
RTCDataChannelEvent constructor allows a null secondary argument
Categories
(Core :: WebRTC, defect, P3)
Core
WebRTC
Tracking
()
NEW
People
(Reporter: lunalu, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.59 Safari/537.36 Steps to reproduce: var pc = new RTCPeerConnection(); var c = pc.createDataChannel(''); var e = new RTCDataChannelEvent('type'); Actual results: No exception was thrown, and the resulting instance had null for the channel attribute even though it's not nullable in the IDL. Expected results: Should make the channel a required argument.
Comment 1•8 years ago
|
||
Confirm the bug because according to the spec param eventInitDict of type RTCDataChannelEventInit is not optional. https://w3c.github.io/webrtc-pc/#rtcdatachannelevent
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•8 years ago
|
Rank: 25
Priority: -- → P2
Comment 2•8 years ago
|
||
Luna wrote tests for this that would fail: https://codereview.chromium.org/2463953002/ We're trying to get our web-platform-tests upstreaming process in order, and hopefully this will be upstreamed soon.
Comment 3•8 years ago
|
||
> Should make the channel a required argument. That's a spec issue, as it's not required in the spec [1]. Please raise it with the spec first. Until that's resolved, it's not clear what console.log(new RTCDataChannelEvent("", {}).channel) should emit. As I recall when this was written, our webidl compiler demanded that dictionaries without at least one required member had to be optional arguments, but it compiles without 'optional' when I try it now, so that may have changed, but it's odd, as it leaves it unclear what e.channel should return in the above case. [1] https://w3c.github.io/webrtc-pc/#idl-def-rtcdatachanneleventinit
Flags: needinfo?(lunalu)
Comment 4•8 years ago
|
||
It is required in the spec: https://github.com/w3c/webrtc-pc/pull/864 Filed https://github.com/w3c/webrtc-pc/issues/942 for the repeated confusion caused by https://w3c.github.io/webrtc-pc/ being out of sync with master.
Updated•8 years ago
|
Flags: needinfo?(lunalu)
Comment 5•7 years ago
|
||
Mass change P2->P3 to align with new Mozilla triage process.
Priority: P2 → P3
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•