nsIPrefBranch::prefHasUserValue should document the fact that a pref no longer has a user set value if it is set to its default value. This "hidden" behavior of the pref system has been the source of numerous bugs. We should at least document the behavior so people will have a fighting chance of not continuously tripping over this.
Have we considered changing the behavior of the pref system to save explicitly-set userprefs even if they match the default?
I think that has been discussed, but nsIPrefBranch is a frozen interface. We'd have to be really careful about changing this "feature" of the pref system.
Created attachment 249861 [details] [diff] [review] patch
Comment on attachment 249861 [details] [diff] [review] patch >Index: modules/libpref/public/nsIPrefBranch.idl >+ * considered reset to it's default value. you meant "its" r+sr=darin
Created attachment 249908 [details] [diff] [review] for checkin Oops.
Attachment #249861 - Attachment is obsolete: true
Checking in mozilla/modules/libpref/public/nsIPrefBranch.idl; /cvsroot/mozilla/modules/libpref/public/nsIPrefBranch.idl,v <-- nsIPrefBranch.idl new revision: 1.20; previous revision: 1.19 done
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
You need to log in before you can comment on or make changes to this bug.