TypedArray.prototype.slice should not throw if no arguments are provided
authorkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 May 2016 00:12:37 +0000 (00:12 +0000)
committerkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 May 2016 00:12:37 +0000 (00:12 +0000)
commit5ed52270d150774196e088db85fcd505caf3f41e
treeed0aa9e845cdb0ebc48287e8975f7c9177cc5fde
parent57a2e988f72692a5f98844b8a2a350742e05d5ec
TypedArray.prototype.slice should not throw if no arguments are provided
https://bugs.webkit.org/show_bug.cgi?id=158044
<rdar://problem/26433280>

Reviewed by Geoffrey Garen.

We were throwing an exception if the TypedArray.prototype.slice function
was not provided arguments. This was wrong. Instead we should just assume
the first argument was 0.

* runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::genericTypedArrayViewProtoFuncSlice): Deleted.
* tests/stress/typedarray-slice.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h
Source/JavaScriptCore/tests/stress/typedarray-slice.js