Open Bug 216895 Opened 22 years ago Updated 2 years ago

Preferences type cannot be changed after clearing

Categories

(Core :: Preferences: Backend, defect, P5)

x86
Windows 2000
defect

Tracking

()

People

(Reporter: bugzilla, Unassigned)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; cs-CZ; rv:1.4) Gecko/20030624 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; cs-CZ; rv:1.4) Gecko/20030624 When you clear some preferences value and try to set new value (but with different type) this raises an exception. You have to restart Mozilla to change preferences type. In the documentation in nsIPrefBranch.idl for the clearing method "ClearUserPref()" is: ---------- * Called to clear a user set value from a specific preference. This will, in * effect, reset the value to the default value. If no default value exists * the preference will cease to exist. ---------- But the behaviour of the ClearUserPref is different. "If no default value exists the preference is cleared but exists until Mozilla restart". Reproducible: Always Steps to Reproduce: 1. Create some pref value e.g. bool type 2. Clear this value 3. Try to set another type to this (char or int) Actual Results: Raises an exception. Expected Results: Set new preferences value with the new type. I have same results with nsIPrefBranch and nsIPref interfaces. For details I am going to include an example in the attachment.
Here is an example: It creates "onlytest.debug.test1" Bool pref value, then clear it and try to write "onlytest.debug.test1" Int pref value, this raises an exception, because Mozilla remember the old type (Bool) until restart.
Reassigning to someone who might actually read bugmail.
Assignee: ccarlen → caillon
I was wrong :-( Sorry for the SPAM
*** Bug 253619 has been marked as a duplicate of this bug. ***
Depends on: 193332
(Filter "spam" on 'prefs-nobody-20080612'.)
Assignee: prefs → nobody
QA Contact: bugzilla → prefs
QA Contact: preferences → preferences-backend
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: