[Webkit-unassigned] [Bug 151303] WebRTC: Check type of this in RTCPeerConnection JS built-in functions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 16 08:10:04 PDT 2016


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

--- Comment #10 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 281448
  --> https://bugs.webkit.org/attachment.cgi?id=281448
Updated patch

View in context: https://bugs.webkit.org/attachment.cgi?id=281448&action=review

> LayoutTests/fast/mediastream/RTCPeerConnection-js-built-ins-check-this.html:52
> +            window.successfullyParsed = true;

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.

> Source/WebCore/Modules/mediastream/RTCPeerConnection.js:38
> +        return @Promise. at reject(new @TypeError("Function should be called on an RTCPeerConnection"));

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?

-- 
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/20160616/32d8b42e/attachment.html>


More information about the webkit-unassigned mailing list