[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 07:33:09 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=158832

--- Comment #2 from Eric Carlson <eric.carlson at apple.com> ---
Comment on attachment 281643
  --> https://bugs.webkit.org/attachment.cgi?id=281643
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?

> 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/49c57940/attachment.html>


More information about the webkit-unassigned mailing list