Closed Bug 1560833 Opened 5 months ago Closed 5 months ago

Remove setters for static VarCache prefs.

Categories

(Core :: Preferences: Backend, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: njn, Assigned: njn)

Details

Attachments

(1 file)

They are dangerous.

Static VarCache prefs have setters. These are dangerous because they can
violate the primary invariant of VarCache prefs, which is that the global
variable always matches the pref value in the table.

Fortunately they are only used in tests, and we can use vanilla pref setters
instead, and get rid of the VarCache setters.

Type: defect → enhancement
Pushed by nnethercote@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/11459fc963ac
Remove setters for static VarCache prefs. r=froydnj
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Assignee: nobody → n.nethercote

An unfortunate consequence of this change is that in the APZ gtests, names of modified prefs have to be provided as strings, so the compiler no longer catches typos and such.

You need to log in before you can comment on or make changes to this bug.