Closed
Bug 720419
Opened 13 years ago
Closed 1 years ago
nsIPrefBranch.resetBranch: Either remove or implement
Categories
(Core :: Preferences: Backend, enhancement)
Tracking
()
RESOLVED
FIXED
116 Branch
Tracking | Status | |
---|---|---|
firefox116 | --- | fixed |
People
(Reporter: WeirdAl, Assigned: marco)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [overhead:noted])
Attachments
(1 file, 1 obsolete file)
/* void resetBranch (in string startingAt); */
NS_IMETHODIMP nsPrefBranch::ResetBranch(const char *aStartingAt)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
It's been this way for years: a method defined in IDL but never, ever implemented. We need to do something about that.
Comment 1•9 years ago
|
||
Ping? Still not implemented?
Also note that according to documentation, it's resetBranch (with lower-case r).
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIPrefBranch#resetBranch%28%29
Workaround for resetting a single pref:
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIPrefBranch#clearUserPref%28%29
Assignee | ||
Comment 2•7 years ago
|
||
If we had this method, we could remove the `resetBranch` custom implementation from Preferences.jsm.
Blocks: 1357517
Updated•6 years ago
|
Whiteboard: [overhead:noted]
Comment 3•6 years ago
|
||
We're removing Preferences.jsm from Sync over in bug 1406475, and use `resetBranch` several times in the tests.
Comment 4•6 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Type: defect → enhancement
Comment 5•4 years ago
|
||
:kmag's thorough review comment suggests we want to move to a world where we reset individual prefs, not whole branches. I'll keep the bug open in case someone would like to pursue that, but I'm not planning to take this over the line, sorry.
Assignee: lina → nobody
Status: ASSIGNED → NEW
Updated•4 years ago
|
Attachment #9023776 -
Attachment is obsolete: true
Updated•2 years ago
|
Severity: normal → S3
Assignee | ||
Comment 6•1 years ago
|
||
Make it so callers need to explicitly iterate through prefs using getChildList
when they want to reset an entire branch, to avoid the footgun of resetting
unintended prefs when using resetBranch for clearing a single pref.
See also https://phabricator.services.mozilla.com/D11381#357618.
Updated•1 years ago
|
Assignee: nobody → mcastelluccio
Status: NEW → ASSIGNED
Pushed by mcastelluccio@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1c7929ef20d2
Remove nsIPrefBranch::ResetBranch. r=KrisWright
Comment 8•1 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 1 years ago
status-firefox116:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•