[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Public WebGL] Re: js binding: function argument type checking
- To: public webgl <public_webgl@khronos.org>
- Subject: [Public WebGL] Re: js binding: function argument type checking
- From: "Mo, Zhenyao" <zhenyao@gmail.com>
- Date: Wed, 11 Aug 2010 19:07:03 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=kDA32/YY8Ba/OAiCg+q7e/qG/fWFrh1BuPyu8oRGcBM=; b=PDpj5oAS9aVlkbR455HZZgoiQ7bq+X2gdVInm7nZ5t7Hwm9Ge0qPs4NXiJr+6eJ5y4 mvfycnMhRj0dualY4RVUFQA0kdU0w/AEPhYbNmQvc3+Wj4oLSHterwLK2oYtUnGQoQd7 doljeDBwa0tYTR30crkVBl3+QS1khTfEbnfCs=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=O915p4SxPVlbJLINXe6vrOOvKRc2BnTxkt3pX/R9Zd6K+62fsHmm2OO06VWUN9piZ+ whDfBHqJi9Fmh9g2Kwsrv7qzEzPIMB1hBUOZMxwtfl3njwR4OID42+pExSnwwzFkyYKv 5oaC0gyj8vjS7nD8L6OQ8qkUC53qTWIjSFyQY=
- In-reply-to: <AANLkTimKNWYTWMyhgkAd9dfHQk2W-43Rd5tkKGza1s7H@mail.gmail.com>
- References: <AANLkTimKNWYTWMyhgkAd9dfHQk2W-43Rd5tkKGza1s7H@mail.gmail.com>
- Sender: owner-public_webgl@khronos.org
Sorry, the email was meant for webkit-dev.
Mo
On Wed, Aug 11, 2010 at 6:55 PM, Mo, Zhenyao <zhenyao@gmail.com> wrote:
> Currently for a function's signature in WebKit, if an argument's type
> is a wrapper type (those JS objec ts that wrap c++ objects, for
> example, JSWebGLProgram, JSCSSRule, etc.) and if the input object's
> type does not match the signature, the input is casted to null and no
> TypeError is raised.
>
> Even though WebKit doesn't use Web IDL specially, I think we can look
> to the Web IDL spec for guidance on what the behavior should be.
> According to Web IDL spec (http://dev.w3.org/2006/webapi/WebIDL/),
> unless [AllowAny] is put in the signature, an TypeError should be
> raised if an argument type does not match its signature. The new
> automatic code generation for overloaded functions in WebKit DOES
> raise TypeError when it fails to determine which overloaded variant to
> call.
>
> We definitely need to do the strict type checking for WebGL functions.
> However, changing the default behavior of the IDL code generators
> might have a significant compatibility impact. It isn't clear to us
> whether the current behavior is intentional. If yes, please let us
> know and we will try to fix the WebGL part only. Otherwise we will
> modify the general rule instead.
>
-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: