Closed
Bug 1314608
Opened 8 years ago
Closed 7 years ago
DevTools addon doesn't update preferences
Categories
(DevTools :: General, enhancement, P3)
DevTools
General
Tracking
(firefox55 fixed)
RESOLVED
FIXED
Firefox 55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: ochameau, Unassigned)
References
Details
Attachments
(1 file)
When using the add-on workflow, any changes made to devtools/client/preferences/devtools.js are ignored. The add-on should try to load this pref file.
Comment hidden (mozreview-request) |
Comment 2•8 years ago
|
||
mozreview-review |
Comment on attachment 8806723 [details] Bug 1314608 - Install preferences via devtools addon and start devtools on addon install. https://reviewboard.mozilla.org/r/90072/#review90550 ::: devtools/bootstrap.js:24 (Diff revision 1) > telemetry.actionOccurred(id); > } > > +function readURI(uri) { > + let stream = NetUtil.newChannel({ > + uri: NetUtil.newURI(uri, 'UTF-8'), Nit: Use " ::: devtools/bootstrap.js:29 (Diff revision 1) > + uri: NetUtil.newURI(uri, 'UTF-8'), > + loadUsingSystemPrincipal: true} > + ).open2(); > + let count = stream.available(); > + let data = NetUtil.readInputStreamToString(stream, count, { > + charset: 'UTF-8' Nit: Use " ::: devtools/bootstrap.js:48 (Diff revision 1) > + > + // Prevent overriding prefs that have been changed by the user > + if (Services.prefs.prefHasUserValue(name)) { > + return; > + } > + if ((val.startsWith("\"") && val.endsWith("\"")) || Wouldn't it be more correct to set pref defaults on change here using `Services.prefs.getDefaultBranch`? That would make it closer to what happens during a regular build with this file. ::: devtools/bootstrap.js:56 (Diff revision 1) > + } else if (val.match(/[0-9]+/)) { > + Services.prefs.setIntPref(name, parseInt(val)); > + } else if (val == "true" || val == "false") { > + Services.prefs.setBoolPref(name, val == "true"); > + } else { > + dump("unable to match type: "+val+"\n"); Remove or convert to console call.
Attachment #8806723 -
Flags: review?(jryans)
Severity: normal → enhancement
Priority: -- → P3
Reporter | ||
Comment 3•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=e4180801b234
Reporter | ||
Comment 4•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=64825908f5d9
Reporter | ||
Comment 5•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=9bfe544dc45f
Reporter | ||
Comment 6•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=42c2f0f35018
Summary: Devtools addon doesn't update preferences → DevTools addon doesn't update preferences
Comment hidden (mozreview-request) |
Reporter | ||
Comment 8•7 years ago
|
||
I switched to use default branch and also process the debugger preferences file. I think at some point I would move parts of bootstrap.js, like this preference code into JS modules, as anything living in bootstrap.js is not updated on Ctrl+Alt+R. Note that Ctrl+Alt+R is still not very well maintained. Mostly because of toolboxes not closing correctly. For go faster purpose I want the addon to work correctly on install but won't necessarely focus on making the hotreload to work ASAP.
Comment 9•7 years ago
|
||
mozreview-review |
Comment on attachment 8806723 [details] Bug 1314608 - Install preferences via devtools addon and start devtools on addon install. https://reviewboard.mozilla.org/r/90072/#review125136 Thanks, this looks like a good improvement! ::: devtools/bootstrap.js:262 (Diff revisions 1 - 2) > "devtools.debugger.prompt-connection": false, > }; > let originalPrefValues = {}; > > let listener; > +let resourceURI; Maybe it's less mysterious to move this above the function that uses it?
Attachment #8806723 -
Flags: review?(jryans) → review+
Comment hidden (mozreview-request) |
Reporter | ||
Comment 11•7 years ago
|
||
(In reply to J. Ryan Stinnett [:jryans] (use ni?) (on PTO until Mar. 28) from comment #9) > Comment on attachment 8806723 [details] > ::: devtools/bootstrap.js:262 > (Diff revisions 1 - 2) > > "devtools.debugger.prompt-connection": false, > > }; > > let originalPrefValues = {}; > > > > let listener; > > +let resourceURI; > > Maybe it's less mysterious to move this above the function that uses it? Yes, I also moved listener and originalPrefValues while adding some comment about each one.
Comment 12•7 years ago
|
||
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/97f43e645459 Install preferences via devtools addon and start devtools on addon install. r=jryans
Comment 13•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/97f43e645459
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•