TypedArray constructor with string shouldn't throw
authorkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Jun 2017 02:40:43 +0000 (02:40 +0000)
committerkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Jun 2017 02:40:43 +0000 (02:40 +0000)
commitd85cdb06397e5b3a06e46280e1a1eb777c8ac904
tree416542384bb179b18e287855d3b8b7567e17b05d
parent327517df43c3e1ebc0dc98abef53a0d158cd4bb6
TypedArray constructor with string shouldn't throw
https://bugs.webkit.org/show_bug.cgi?id=173181

Reviewed by JF Bastien.

JSTests:

We should be coercing primitive arguments to numbers in the various
TypedArray constructors.

* stress/typedarray-constructor.js:

Source/JavaScriptCore:

We should be coercing primitive arguments to numbers in the various
TypedArray constructors.

* runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::constructGenericTypedArrayViewWithArguments):

LayoutTests:

Update tests to allow null buffers.

* fast/canvas/webgl/array-unit-tests-expected.txt:
* fast/canvas/webgl/array-unit-tests.html:
* fast/canvas/webgl/webgl-array-invalid-ranges-expected.txt:
* fast/canvas/webgl/webgl-array-invalid-ranges.html:
* webgl/1.0.2/resources/webgl_test_files/conformance/typedarrays/array-unit-tests.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/stress/typedarray-constructor.js
LayoutTests/ChangeLog
LayoutTests/fast/canvas/webgl/array-unit-tests-expected.txt
LayoutTests/fast/canvas/webgl/array-unit-tests.html
LayoutTests/fast/canvas/webgl/webgl-array-invalid-ranges-expected.txt
LayoutTests/fast/canvas/webgl/webgl-array-invalid-ranges.html
LayoutTests/webgl/1.0.2/resources/webgl_test_files/conformance/typedarrays/array-unit-tests.html
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h