Closed Bug 1406085 Opened 7 years ago Closed 7 years ago

enumProperties does not work well for integer indices that are not array indices

Categories

(DevTools :: Console, enhancement)

58 Branch
enhancement
Not set
normal

Tracking

(firefox58 fixed)

RESOLVED FIXED
Firefox 58
Tracking Status
firefox58 --- fixed

People

(Reporter: Oriol, Assigned: Oriol)

Details

Attachments

(1 file)

When reviewing bug 1403065, I assumed Firefox followed the ECMAScript spec and sorted all integer indices at the beginning. However, it seems it only does so for array indices:

    Reflect.ownKeys({a:1, [2**32-2]: 2, [2**32-1]: 3});
    // [ "4294967294", "a", "4294967295" ]

Therefore, object inspector still skips properties in

    inspect(Object.assign([], {[1]:0, [2**32-1]:0}))
Attachment #8915609 - Flags: review?(bgrinstead) → review?(nchevobbe)
Comment on attachment 8915609 [details]
Bug 1406085 - Only consider array indices to be indexed properties.

https://reviewboard.mozilla.org/r/186802/#review192178

Looks good to me, thanks Oriol !
Attachment #8915609 - Flags: review?(nchevobbe) → review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/c18b5243c870
Only consider array indices to be indexed properties. r=nchevobbe
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/c18b5243c870
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: