Closed Bug 1560833 Opened 5 years ago Closed 5 years ago

Remove setters for static VarCache prefs.

Categories

(Core :: Preferences: Backend, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

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 years 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.

Attachment

General

Created:
Updated:
Size: