[webkit-dev] js binding: function argument type checking
Cedric Vivier
cedricv at neonux.com
Wed Aug 11 22:29:53 PDT 2010
On Thu, Aug 12, 2010 at 13:26, Sam Weinig <sam.weinig at gmail.com> wrote:
> For this specific case, it seems like you could easily check for a null
> WebGLProgram* in WebGLRenderingContext::useProgram and set the
> ExceptionCode.
Nope, null is a valid argument, it bounds to the initial program, which
means nothing will be drawn with WebGL.
Certainly not the expected behavior when one pass the wrong type to the
argument like Zhenyao pointed out, therefore throwing TypeError really makes
sense here (and elsewhere with WebGL API).
Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20100812/5525b206/attachment.html>
More information about the webkit-dev
mailing list