Closed Bug 886553 Opened 11 years ago Closed 11 years ago

complexValue prefbranch code doesn't notify pref:changed observer and prefbranch.getPrefType also doesn't support complex types

Categories

(Core :: Preferences: Backend, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: martijn.martijn, Unassigned)

References

(Blocks 1 open bug, )

Details

While trying to come up with a patch in bug 886260, I noticed that complexvalue is very poorly supported in the code.
setComplexValue doesn't seem to trigger observer notifications and getPrefType doesn't support complex types, which are needed to fix bug 886260 properly.
Complex prefs are bolted on to regular prefs and aren't their own "type", they are all stored as char prefs. getPrefType can't really change because it's likely that consumers depend on the current behavior.

I'm pretty sure complexvalue setters fire notifications through setCharPrefInternal -> pref_HashPref which fires observers.
Flags: needinfo?(martijn.martijn)
I tried writing a testcase that shows the bug, but for some reason, I can't get this observer thing working at all in a standalone testcase: http://people.mozilla.org/~mwargers/tests/setcomplexvalue.html

(
As a sidenote, I tried installing the SpecialPowers extension in my desktop Firefox browser here: https://github.com/humphd/SpecialPowers
https://github.com/downloads/humphd/SpecialPowers/SpecialPowers.xpi
But that doesn't seem to work.
)
Flags: needinfo?(martijn.martijn)
Ok, thanks for the info, I guess this is indeed invalid.
Apparently on deskop "PrefD" and "ProfD" of directory_service is the same path.
It seems that when even though you have 2 different nsIFile instances for instances, they still are the same stored in prefs, when they have the same path. I guess that is what comment 1 describes.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.