Ignore:
Timestamp:
Aug 7, 2017, 7:29:42 PM (8 years ago)
Author:
[email protected]
Message:

GetOwnProperty of TypedArray indexed fields is wrongly configurable
https://bugs.webkit.org/show_bug.cgi?id=175307

Patch by Robin Morisset <[email protected]> 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):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r220368 r220377  
     12017-08-07  Robin Morisset  <[email protected]>
     2
     3        GetOwnProperty of TypedArray indexed fields is wrongly configurable
     4        https://bugs.webkit.org/show_bug.cgi?id=175307
     5
     6        Reviewed by Saam Barati.
     7
     8        ```
     9        let a = new Uint8Array(10);
     10        let b = Object.getOwnPropertyDescriptor(a, 0);
     11        assert(b.configurable === false);
     12        ```
     13        should not fail: by section 9.4.5.1 (https://tc39.github.io/ecma262/#sec-integer-indexed-exotic-objects-getownproperty-p)
     14        that applies to integer indexed exotic objects, and section 22.2.7 (https://tc39.github.io/ecma262/#sec-properties-of-typedarray-instances)
     15        that says that typed arrays are integer indexed exotic objects.
     16
     17        * runtime/JSGenericTypedArrayViewInlines.h:
     18        (JSC::JSGenericTypedArrayView<Adaptor>::getOwnPropertySlotByIndex):
     19
    1202017-08-07  Filip Pizlo  <[email protected]>
    221
Note: See TracChangeset for help on using the changeset viewer.