I am going to take out this code altogether. When we specified in the WebGL working group that out-of-range accesses raise exceptions for the new CanvasArray types, we didn't realize that JavaScript defines array indices to be unsigned. An access to index -1 causes -1 to be converted to a string and resolved as a property lookup. It's portable at least between V8 and JSC to write
canvas_float_array[-1] = 'foo'; canvas_float_array[-1]; and get "foo" as the result -- if this explicit check is removed. I've raised this as a specification issue on the Khronos 3dweb mailing list and will send out a review removing this code. -Ken --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
