[Webkit-unassigned] [Bug 158832] WebRTC: Replace RTCPeerConnection custom constructor with a JS built-in constructor

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 20 12:44:36 PDT 2016


--- Comment #4 from Adam Bergkvist <adam.bergkvist at ericsson.com> ---
(In reply to comment #2)
> Comment on attachment 281643 [details]
> Proposed patch
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=281643&action=review
> > LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt:7
> > +PASS new webkitRTCPeerConnection(null); threw exception TypeError: Type error.
> > +PASS new webkitRTCPeerConnection(undefined); threw exception TypeError: Type error.
> I think it may be confusing to a developer that passing null or undefined
> results in an exception with the generic message 'Type error', but passing
> an empty string yields the much more informative message 'RTCPeerConnection
> argument must be a valid Dictionary'. Why the difference?

Let's not introduce such a behavior. I modified the JS constructor slightly to behave exactly like the old custom constructor; hence no changes to the test any more. The current behavior is not really spec compliant, but there's a bug to address that [1] (also noted in change log).

[1] http://webkit.org/b/158936

> > LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt:10
> > +PASS new webkitRTCPeerConnection({}); threw exception TypeError: Type error.
> Ditto.
> > Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp:84
> > +
> Nit: I am not sure this blank line aids readability.


You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160620/5bc763e0/attachment.html>

More information about the webkit-unassigned mailing list