[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] TypedArray constructors and zero length

On Thu, Jun 10, 2010 at 23:55, Vladimir Vukicevic <vladimir@mozilla.com> wrote:
>> FWIW I wrote some tests on this today, Mozilla has the sane behavior
>> of throwing an exception ("invalid array size") when length is
>> negative while WebKit swaps like crazy attempting to allocate
>> memory... and in the end returns "undefined".
> Note that we don't throw because it's negative, but because it's larger than the biggest size that we allow due to implementation constraints (roughly 2^31).

Which is quite equivalent in the end, it should be specified what
happens when instantiation fails (for whatever reason), so that we
don't have inconsistent behavior between implementations like it is
the case currently. I support Mozilla's current behavior, if it cannot
create the typed array, just throw (as usual, and as with standard
Javascript Array object).

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: