Bug 159653 - defineProperty on a index of a TypedArray should throw if configurable
Summary: defineProperty on a index of a TypedArray should throw if configurable
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Miller
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-11 16:21 PDT by Keith Miller
Modified: 2016-07-11 16:40 PDT (History)
4 users (show)

See Also:


Attachments
Patch (7.30 KB, patch)
2016-07-11 16:23 PDT, Keith Miller
saam: review+
saam: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Miller 2016-07-11 16:21:57 PDT
defineProperty on a index of a TypedArray should throw if configurable
Comment 1 Keith Miller 2016-07-11 16:23:51 PDT
Created attachment 283361 [details]
Patch
Comment 2 Saam Barati 2016-07-11 16:27:47 PDT
Comment on attachment 283361 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=283361&action=review

r=me with a suggestion

> Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h:351
> +        if (!(descriptor.attributes() & DontDelete))

I think this is cleaner if you just call: "descriptor.configurable()"

> Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h:354
> +        if (descriptor.attributes() & (DontEnum | ReadOnly))

ditto here but with descriptor.enumerable() and descriptor.writable()
Comment 3 Keith Miller 2016-07-11 16:38:19 PDT
Comment on attachment 283361 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=283361&action=review

>> Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h:351
>> +        if (!(descriptor.attributes() & DontDelete))
> 
> I think this is cleaner if you just call: "descriptor.configurable()"

Fixed.

>> Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h:354
>> +        if (descriptor.attributes() & (DontEnum | ReadOnly))
> 
> ditto here but with descriptor.enumerable() and descriptor.writable()

Fixed.
Comment 4 Keith Miller 2016-07-11 16:40:14 PDT
Committed r203096: <http://trac.webkit.org/changeset/203096>