Closed Bug 1062490 Opened 9 years ago Closed 9 years ago

Array indexes in console.table() are sorted lexicographically

Categories

(DevTools :: Console, defect)

defect
Not set
normal

Tracking

(firefox34 fixed, firefox35 fixed)

RESOLVED FIXED
Firefox 35
Tracking Status
firefox34 --- fixed
firefox35 --- fixed

People

(Reporter: harth, Assigned: gl)

References

Details

Attachments

(1 file)

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)
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: 9 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.