Closed
Bug 1130392
Opened 10 years ago
Closed 10 years ago
The list of numeric properties on an object in the debugger should always be sorted in incrementing order
Categories
(DevTools :: Debugger, defect, P3)
DevTools
Debugger
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 967319
People
(Reporter: jaws, Unassigned)
References
(Blocks 1 open bug)
Details
+++ This bug was initially created as a clone of Bug #883702 +++
The debugger sorts properties in alphabetical ordering, but when it comes to numerical properties it sorts them in the following order:
0:
1:
10:
100:
101 through 108:
109:
11:
110:
etc.
It is treating those numbers as strings.
Reporter | ||
Updated•10 years ago
|
Mentor: jaws
Reporter | ||
Updated•10 years ago
|
Assignee: nobody → rtorruellas
Status: NEW → ASSIGNED
Reporter | ||
Comment 1•10 years ago
|
||
Simpler steps to reproduce:
In the console, type the following commands:
let a = {1: 1, 2: 2, 10:10};
a;
Notice how the console shows that the value of `a` is `Object { 1: 1, 2: 2, 10: 10 }`.
Click on the "Object" value.
The variables view that appears will show the properties in a vertical column, in the order of: 1, 10, 2.
To fix this bug, you will need to edit http://mxr.mozilla.org/mozilla-central/source/browser/devtools/shared/widgets/VariablesView.jsm?rev=0f7b2674c64a#1398 and http://mxr.mozilla.org/mozilla-central/source/browser/devtools/shared/widgets/VariablesView.jsm?rev=0f7b2674c64a#2235 to take a custom sorting function that will order properties that parse as numbers numerically (in increasing order), and properties that do not parse as numbers lexicographically.
Reporter | ||
Updated•10 years ago
|
Assignee: rtorruellas → bmax1337
Comment 2•10 years ago
|
||
This is a duplicate of bug 967319 (six digits!), but I will leave it up to you which way to dupe.
Reporter | ||
Comment 3•10 years ago
|
||
We can dupe to the older bug. Brandon, I'm going to close this bug and re-assign you to bug 967319 since it was filed first :)
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Updated•10 years ago
|
Assignee: bmax1337 → nobody
Mentor: jaws
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•