Open Bug 343600 Opened 18 years ago Updated 2 years ago

deleteBranch won't notify observers

Categories

(Core :: Preferences: Backend, defect)

defect

Tracking

()

People

(Reporter: nmaier, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4 Observers added to a nsiPrefBranch2 won't be notified when the PrefBranch is changed/removed using deleteBranch. The underlying libpref code won't issue the callback: http://lxr.mozilla.org/seamonkey/source/modules/libpref/src/prefapi.cpp#529 Although eg. the libpref code for clearUserPref will: http://lxr.mozilla.org/seamonkey/source/modules/libpref/src/prefapi.cpp#573 IMO, the optimal solution would be to use another topic cause the branch wasn't changed but deleted. Some notification must be there however. Reproducible: Always
Yeah, this hit me when trying to fix bug 349991...
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Filter "spam" on 'prefs-nobody-20080612'.)
Assignee: prefs → nobody
QA Contact: prefs
QA Contact: preferences → preferences-backend
Still open? I think tbhis is what I see. about:config doesn';t change when deleteBranch() is called, but re-opening about:config in another window shows the branch really has gone.

An observation: if you call clearUserPref() on a pref that only has a user value, it will be deleted, and observers will be notified in that case.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.