WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
45487
TypedArray should throw exception if length not a multiple of element size
https://bugs.webkit.org/show_bug.cgi?id=45487
Summary
TypedArray should throw exception if length not a multiple of element size
Adrienne Walker
Reported
2010-09-09 13:21:06 PDT
From the Typed Array spec: "If length is not explicitly specified, the length of the ArrayBuffer minus the byteOffset must be a multiple of the element size of the specific type, or an exception is raised." Therefore, this code should throw an exception, but currently doesn't: var buffer = new ArrayBuffer(1); var buf = new Uint16Array(buffer); Once fixed, this test case should be added to the Khronos array-unit-tests.html conformance test.
Attachments
patch
(23.39 KB, patch)
2010-11-04 16:44 PDT
,
Zhenyao Mo
kbr
: review+
zmo
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Adrienne Walker
Comment 1
2010-10-13 14:51:35 PDT
(In reply to
comment #0
)
> Once fixed, this test case should be added to the Khronos array-unit-tests.html conformance test.
kbr went ahead and updated the conformance test.
Zhenyao Mo
Comment 2
2010-11-04 16:44:05 PDT
Created
attachment 73005
[details]
patch Tests are synced with khronos. Tested in both Chromium and Safari.
Kenneth Russell
Comment 3
2010-11-04 17:42:24 PDT
Comment on
attachment 73005
[details]
patch Looks good.
Zhenyao Mo
Comment 4
2010-11-04 17:53:10 PDT
Committed
r71371
: <
http://trac.webkit.org/changeset/71371
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug