Closed
Bug 1273584
Opened 9 years ago
Closed 9 years ago
Displayed device list pref grows forever
Categories
(DevTools :: Responsive Design Mode, defect, P1)
DevTools
Responsive Design Mode
Tracking
(firefox49 fixed)
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: jryans, Assigned: jryans)
References
Details
(Whiteboard: [multiviewport] [mvp-rdm])
Attachments
(1 file)
I noticed recently that we are always appending the default displayed devices to the array, whether or not they are in there.
This means the array is always growing in size, with more and more duplicates.
Assignee | ||
Comment 1•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/53268/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/53268/
Attachment #8753434 -
Flags: review?(gl)
Assignee | ||
Comment 2•9 years ago
|
||
This version should work, but we may actually want a data structure that deduplicates. At the moment, those of us who work on the tool would still have large pref data even with this change.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=8769e03479ab
Comment 3•9 years ago
|
||
https://reviewboard.mozilla.org/r/53268/#review50052
::: devtools/client/responsive.html/devices.js:37
(Diff revision 1)
> - if (newDevice.displayed) {
> + if (newDevice.displayed && !deviceList.includes(newDevice.name)) {
> deviceList.push(newDevice.name);
Switch this to a JavaScript Set and you'll get your deduplicating and won't have to add this condition.
You can then use Array.from(deviceSet) to get an array out of it for any external APIs.
Assignee | ||
Comment 4•9 years ago
|
||
https://reviewboard.mozilla.org/r/53268/#review50052
> Switch this to a JavaScript Set and you'll get your deduplicating and won't have to add this condition.
>
> You can then use Array.from(deviceSet) to get an array out of it for any external APIs.
Yep, a Set had ocurred to me too! I couldn't remember if you can iterate in insertion order, but it looks like you can. I'll give it a try.
Assignee | ||
Updated•9 years ago
|
Attachment #8753434 -
Flags: review?(gl)
Assignee | ||
Comment 5•9 years ago
|
||
Comment on attachment 8753434 [details]
MozReview Request: Bug 1273584 - Stop growing device list forever. r=gl
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/53268/diff/1-2/
Attachment #8753434 -
Flags: review?(gl)
Assignee | ||
Comment 6•9 years ago
|
||
Comment 7•9 years ago
|
||
Comment on attachment 8753434 [details]
MozReview Request: Bug 1273584 - Stop growing device list forever. r=gl
https://reviewboard.mozilla.org/r/53268/#review50564
Attachment #8753434 -
Flags: review?(gl) → review+
Updated•9 years ago
|
Iteration: --- → 49.2 - May 23
Flags: qe-verify-
Priority: -- → P1
Whiteboard: [multiviewport][triage] → [multiviewport] [mvp-rdm]
Comment 9•9 years ago
|
||
Backed out for WinXP browser_responsiveui_touch.js failures.
https://hg.mozilla.org/integration/fx-team/rev/2013e1255bf8
https://treeherder.mozilla.org/logviewer.html#?job_id=9436369&repo=fx-team#L2930
Assignee | ||
Comment 10•9 years ago
|
||
Assignee | ||
Comment 11•9 years ago
|
||
Seems to be fine in my WinXP try run above, let's try landing again.
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 12•9 years ago
|
||
Keywords: checkin-needed
Updated•9 years ago
|
Iteration: 49.2 - May 23 → 49.3 - Jun 6
Comment 13•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 49
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•