GetOwnProperty of TypedArray indexed fields is wrongly configurable
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Aug 2017 02:29:42 +0000 (02:29 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Aug 2017 02:29:42 +0000 (02:29 +0000)
commit178141443bab0506d951330c5953cb9a25ee580d
tree958912170a81c6429e8dca9148a95685a15ff381
parented715aa7002a92fef37eee66dbfe870ece12f9c8
GetOwnProperty of TypedArray indexed fields is wrongly configurable
https://bugs.webkit.org/show_bug.cgi?id=175307

Patch by Robin Morisset <rmorisset@apple.com> on 2017-08-07
Reviewed by Saam Barati.

JSTests:

* stress/typedarray-getownproperty-not-configurable.js: Added.
(assert):
(foo):

Source/JavaScriptCore:

```
let a = new Uint8Array(10);
let b = Object.getOwnPropertyDescriptor(a, 0);
assert(b.configurable === false);
```
should not fail: by section 9.4.5.1 (https://tc39.github.io/ecma262/#sec-integer-indexed-exotic-objects-getownproperty-p)
that applies to integer indexed exotic objects, and section 22.2.7 (https://tc39.github.io/ecma262/#sec-properties-of-typedarray-instances)
that says that typed arrays are integer indexed exotic objects.

* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::getOwnPropertySlotByIndex):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/stress/typedarray-getownproperty-not-configurable.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h