Open Bug 1672265 Opened 4 years ago Updated 2 years ago

Preferences should be able to handle float mirrors that are not actually floats

Categories

(Core :: Preferences: Backend, defect)

defect

Tracking

()

People

(Reporter: KrisWright, Unassigned)

References

Details

I'm not sure if this should be kept a back-end issue or handled at some higher level. Essentially:

  • User changes a float pref to some non-float value, like 1,000 or abcd
  • The back-end attempts to update the mirror, which involves this cast, because float prefs are actually stored as strings.
  • The mirror fails to update, because the cast fails which causes GetPrefValue() to fail.

This would not be an issue if we forbade entry of non-floaty values for these prefs in about:config, but I'm not sure how to do that or if that'd be feasible for every single pref with some kind of float mirror implementation. Without any user entry safeguards, we need to be able to handle this kind of problem on the back-end. That may mean handling the cast differently or maybe restoring the original pref value if the cast fails.

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