[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 10:50:59 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=151303
--- Comment #11 from Adam Bergkvist <adam.bergkvist at ericsson.com> ---
(In reply to comment #10)
> Comment on attachment 281448 [details]
> 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.
I might do that and see if we can contribute tests to the W3C test suite.
> > 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?
I think that's a good idea.
--
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/ca1fc88c/attachment.html>
More information about the webkit-unassigned
mailing list