<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - WebRTC: Replace RTCPeerConnection custom constructor with a JS built-in constructor"
href="https://bugs.webkit.org/show_bug.cgi?id=158832#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - WebRTC: Replace RTCPeerConnection custom constructor with a JS built-in constructor"
href="https://bugs.webkit.org/show_bug.cgi?id=158832">bug 158832</a>
from <span class="vcard"><a class="email" href="mailto:eric.carlson@apple.com" title="Eric Carlson <eric.carlson@apple.com>"> <span class="fn">Eric Carlson</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=281643&action=diff" name="attach_281643" title="Proposed patch">attachment 281643</a> <a href="attachment.cgi?id=281643&action=edit" title="Proposed patch">[details]</a></span>
Proposed patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=281643&action=review">https://bugs.webkit.org/attachment.cgi?id=281643&action=review</a>
<span class="quote">> 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.</span >
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?
<span class="quote">> LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt:10
> +PASS new webkitRTCPeerConnection({}); threw exception TypeError: Type error.</span >
Ditto.
<span class="quote">> Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp:84
> +</span >
Nit: I am not sure this blank line aids readability.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>