Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normative: Use array indices instead of integer indices in OrdinaryOw…
…nPropertyKeys (#1242) All major JavaScript engines agree on the following behavior: $ eshost -e 'Reflect.ownKeys({ a: 1, [Number.MAX_SAFE_INTEGER]: 1, 42: 1, [2**32-1]: 1, [2**32-2]: 1 })' #### Chakra 42,4294967294,a,9007199254740991,4294967295 #### V8 --harmony 42,4294967294,a,9007199254740991,4294967295 #### V8 42,4294967294,a,9007199254740991,4294967295 #### JavaScriptCore 42,4294967294,a,9007199254740991,4294967295 #### SpiderMonkey 42,4294967294,a,9007199254740991,4294967295 That is, the order is: - array indices, in ascending numeric index order - strings that are not array indices, in ascending chronological creation order - symbols, in ascending chronological creation order This patch makes the spec for `OrdinaryOwnPropertyKeys` match Web reality.
- Loading branch information