<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - WebRTC: Check type of this in RTCPeerConnection JS built-in functions"
href="https://bugs.webkit.org/show_bug.cgi?id=151303#c10">Comment # 10</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - WebRTC: Check type of this in RTCPeerConnection JS built-in functions"
href="https://bugs.webkit.org/show_bug.cgi?id=151303">bug 151303</a>
from <span class="vcard"><a class="email" href="mailto:youennf@gmail.com" title="youenn fablet <youennf@gmail.com>"> <span class="fn">youenn fablet</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=281448&action=diff" name="attach_281448" title="Updated patch">attachment 281448</a> <a href="attachment.cgi?id=281448&action=edit" title="Updated patch">[details]</a></span>
Updated patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=281448&action=review">https://bugs.webkit.org/attachment.cgi?id=281448&action=review</a>
<span class="quote">> LayoutTests/fast/mediastream/RTCPeerConnection-js-built-ins-check-this.html:52
> + window.successfullyParsed = true;</span >
With testharness.js, these 10 lines would no longer be needed.
Promise-based test handling by testharness.js is really nice.
I would tend to use those here. You can have a look in fetch or streams tests.
<span class="quote">> Source/WebCore/Modules/mediastream/RTCPeerConnection.js:38
> + return @Promise.@reject(new @TypeError("Function should be called on an RTCPeerConnection"));</span >
This message is consistent with other built-ins which is good.
But it is not with binding generated messages (something like "Can only call RTCPeerConnection.createOffer on instances of RTCPeerConnection").
Maybe we should add something like @createBadThisFunctionError taking interface and function name as input to have the same messages in both places.
Or maybe making consistent is not all that important?</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>