Array indexes in console.table() are sorted lexicographically

RESOLVED FIXED in Firefox 34

Status

defect
RESOLVED FIXED
5 years ago
Last year

People

(Reporter: harth, Assigned: gl)

Tracking

unspecified
Firefox 35
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox34 fixed, firefox35 fixed)

Details

Attachments

(1 attachment)

console.table() an array of more than 10 things, then sort by their index by clicking on the first column in the output. You'll see:

0
1
10
2
3
...

It's sorting lexicographically. We should sort this column numerically.
Gabriel, I think you already had a patch for this. If you do, can you upload it and flag for review? Otherwise no worries.
Flags: needinfo?(gabriel.luong)
Duplicate of this bug: 1060064
Assignee: nobody → gabriel.luong
Flags: needinfo?(gabriel.luong)
Comment on attachment 8484287 [details] [diff] [review]
1062490.patch

Thanks!
Attachment #8484287 - Flags: review?(fayearthur) → review+
Keywords: checkin-needed
Comment on attachment 8484287 [details] [diff] [review]
1062490.patch

Approval Request Comment
[Feature/regressing bug #]: 1062490
[User impact if declined]: The index column for console.table() will be sorted incorrectly. This makes it appear as if console.table() is a WIP and not a completed feature.
[Describe test coverage new/current, TBPL]: Green try, minor changes to the test of indices in the previous tests which resulted in converting the string numeric values to actual integers.
[Risks and why]: None
[String/UUID change made/needed]: None
Attachment #8484287 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/8733499c2f16
Status: NEW → RESOLVED
Closed: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 35
Comment on attachment 8484287 [details] [diff] [review]
1062490.patch

Aurora+
Attachment #8484287 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.