Closed
Bug 1309384
Opened 8 years ago
Closed 8 years ago
prefs shim should merge in prefs defaults at startup
Categories
(DevTools :: Framework, enhancement, P1)
DevTools
Framework
Tracking
(firefox52 fixed)
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: tromey, Assigned: tromey)
References
Details
(Whiteboard: [devtools-html])
Attachments
(2 files, 1 obsolete file)
The prefs shim should either merge in defaults at startup or it
should write everything out. (But probably merging is best.)
See https://bugzilla.mozilla.org/show_bug.cgi?id=1291049#c63
Updated•8 years ago
|
Iteration: --- → 52.2 - Oct 17
Flags: qe-verify-
Priority: -- → P1
Whiteboard: [devtools-html] → [reserve-html]
Comment 1•8 years ago
|
||
Thanks for filing Tom!
(In reply to Tom Tromey :tromey from comment #0)
> The prefs shim should either merge in defaults at startup or it
> should write everything out. (But probably merging is best.)
I agree, merging would be the best here. This way if a default value changes and has not been overridden by the user, the new default value will be used.
Assignee | ||
Comment 2•8 years ago
|
||
Wow, I really don't know what I was thinking in this code.
The startup stuff all seems backward.
Comment hidden (mozreview-request) |
Comment 4•8 years ago
|
||
mozreview-review |
Comment on attachment 8801146 [details]
Bug 1309384 - merge default and user prefs in Services shim;
https://reviewboard.mozilla.org/r/85918/#review84586
Great patch, thanks for fixing this! Just two nits.
(For the record I tested your patch with the inspector webpack bundle and it fixes the startup issue)
::: devtools/client/shared/shim/Services.js:363
(Diff revision 1)
> * @param {Any} userValue the user value to use if the pref does not exist
> * @param {Any} defaultValue the default value to use if the pref
> * does not exist
> * @param {Boolean} hasUserValue if a new pref is created, whether
> * the default value is also a user value
> + * @param {Boolean} init if true, then this call is initialization
nit: The two previous arguments are swapped in the jsdoc, would be nice to fix it here.
::: devtools/client/shared/shim/test/test_service_prefs_defaults.html:67
(Diff revision 1)
> +
> + SimpleTest.finish();
> +}
> +
> +SimpleTest.waitForExplicitFinish();
> +do_tests();
nit: Since the test is synchronous I think you can get rid of SimpleTest.finish(), SimpleTest.waitForExplicitFinish() as well as the "do_tests" wrapper.
Attachment #8801146 -
Flags: review?(jdescottes) → review+
Updated•8 years ago
|
Whiteboard: [reserve-html] → [devtools-html]
Comment hidden (mozreview-request) |
Comment 6•8 years ago
|
||
Tom: I pushed https://bugzilla.mozilla.org/attachment.cgi?id=8801183 here so that I don't forget.
While testing your patch I realized the preferences where still not saved when reloading the inspector. Maybe it's best to address it in a separate bug? But if you want to integrate it and land it here, that works for me :)
Assignee | ||
Comment 7•8 years ago
|
||
mozreview-review |
Comment on attachment 8801183 [details]
Bug 1309384 - fix override of default preference;
https://reviewboard.mozilla.org/r/85926/#review84618
Thanks, this looks good.
Attachment #8801183 -
Flags: review?(ttromey) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 10•8 years ago
|
||
mozreview-review |
Comment on attachment 8801227 [details]
Bug 1309384 - fix override of default preference;
https://reviewboard.mozilla.org/r/85940/#review84620
I already r+d the other one, this is just fixing it after the changes requested to the first patch.
Attachment #8801227 -
Flags: review?(ttromey) → review+
Assignee | ||
Comment 11•8 years ago
|
||
Comment on attachment 8801183 [details]
Bug 1309384 - fix override of default preference;
I would have thought that mozreview would do this automatically.
Attachment #8801183 -
Attachment is obsolete: true
Comment 12•8 years ago
|
||
Pushed by ttromey@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d61c25d687c4
merge default and user prefs in Services shim; r=jdescottes
https://hg.mozilla.org/integration/autoland/rev/ce7b9aa047e8
fix override of default preference;r=tromey
Comment 13•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d61c25d687c4
https://hg.mozilla.org/mozilla-central/rev/ce7b9aa047e8
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•