Bug 33352 - Passing array that is too large to set method of WebGLArrays does not throw an exception
Summary: Passing array that is too large to set method of WebGLArrays does not throw a...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Kenneth Russell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-07 15:57 PST by Chris Marrin
Modified: 2010-01-08 17:03 PST (History)
6 users (show)

See Also:


Attachments
Patch (12.20 KB, patch)
2010-01-07 17:18 PST, Kenneth Russell
no flags Details | Formatted Diff | Diff
Revised patch (12.24 KB, patch)
2010-01-07 17:36 PST, Kenneth Russell
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Marrin 2010-01-07 15:57:31 PST
The spec says it should but:

    var array = new WebGLFloatArray([1,2]);
    array.set([3, 4, 5]);

sets the array to [ 3, 4 ], rather than throwing.
Comment 1 Kenneth Russell 2010-01-07 17:18:42 PST
Created attachment 46099 [details]
Patch

Added needed range checks to JSC and V8 custom bindings. Expanded preexisting test suite for WebGLArrays and updated its expected results. Tested in WebKit and Chromium.
Comment 2 WebKit Review Bot 2010-01-07 17:25:09 PST
Attachment 46099 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebCore/bindings/js/JSWebGLArrayHelper.h:35:  Alphabetical sorting problem.  [build/include_order] [4]
WebCore/bindings/js/JSWebGLArrayHelper.h:52:  One line control clauses should not use braces.  [whitespace/braces] [4]
WebCore/bindings/v8/custom/V8WebGLArrayCustom.h:179:  One line control clauses should not use braces.  [whitespace/braces] [4]
WebCore/bindings/v8/custom/V8WebGLArrayCustom.h:182:  One line control clauses should not use braces.  [whitespace/braces] [4]
Total errors found: 4
Comment 3 Kenneth Russell 2010-01-07 17:36:27 PST
Created attachment 46101 [details]
Revised patch

Fixed style errors in previous patch.
Comment 4 WebKit Review Bot 2010-01-07 17:41:14 PST
style-queue ran check-webkit-style on attachment 46101 [details] without any errors.
Comment 5 WebKit Commit Bot 2010-01-08 17:03:02 PST
Comment on attachment 46101 [details]
Revised patch

Clearing flags on attachment: 46101

Committed r53026: <http://trac.webkit.org/changeset/53026>
Comment 6 WebKit Commit Bot 2010-01-08 17:03:10 PST
All reviewed patches have been landed.  Closing bug.