Closed Bug 1406171 Opened 8 years ago Closed 6 years ago

Sort all integer indexed properties in [[OwnPropertyKeys]]

Categories

(Core :: JavaScript Engine, defect, P3)

defect

Tracking

()

RESOLVED INVALID
Tracking Status
firefox58 --- affected

People

(Reporter: anba, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [js:correctness])

Per the spec all integer indexed properties should appear before string- and symbol-valued property keys. ``` var o = { a: 0, 4294967296: 0, 0: 0 }; print(Reflect.ownKeys(o)); ``` Expected: Prints "0,4294967296,a" Actual: Prints "0,a,4294967296" https://tc39.github.io/ecma262/#sec-ordinaryownpropertykeys 9.1.11.1 OrdinaryOwnPropertyKeys ( O ) ... 2. For each own property key P of O that is an integer index, in ascending numeric index order, do a. Add P as the last element of keys. ... 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.
Priority: -- → P3
Whiteboard: [js:correctness]
Blocks: test262
See also https://github.com/tc39/ecma262/pull/1242 for changing the spec to our current behavior.

No longer valid now that the spec PR has been merged.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.