WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
186691
[[OwnPropertyKeys]] order with large integer index keys up to 2 ** 53 - 1
https://bugs.webkit.org/show_bug.cgi?id=186691
Summary
[[OwnPropertyKeys]] order with large integer index keys up to 2 ** 53 - 1
Leo Balter
Reported
2018-06-15 13:40:36 PDT
From
https://tc39.github.io/ecma262/#sec-object-type
> An integer index is a String-valued property key that is a canonical numeric String (see 7.1.16) and whose numeric value is either +0 or a positive integer ≤ 2**53-1. An array index is an integer index whose numeric value i is in the range +0 ≤ i < 2**32-1.
https://github.com/tc39/test262/pull/1580
Current behavior is not taking values from 2 ** 32 and up as integer index. ``` var o1 = { 12345678900: true, b: true, 1: true, a: true, [Number.MAX_SAFE_INTEGER]: true, 12345678901: true, }; var result = Object.getOwnPropertyNames(o1); result.forEach(k => console.log(k)); ``` prints: ``` "1" "12345678900" "b" "a" "9007199254740991" "12345678901" ``` It should print: ``` "1" "12345678900" "12345678901" "9007199254740991" "b" "a" ```
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Shvayka
Comment 1
2020-11-29 11:51:19 PST
(In reply to Leo Balter from
comment #0
)
>
https://github.com/tc39/test262/pull/1580
> > Current behavior is not taking values from 2 ** 32 and up as integer index.
https://github.com/tc39/ecma262/pull/1242
replaced "integer index" with "array index", aligning the spec with web reality. (In reply to Leo Balter from
comment #0
)
> "1" > "12345678900" > "b" > "a" > "9007199254740991" > "12345678901"
is now printed by JSC, V8, and SpiderMonkey as per updated spec.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug