Closed Bug 1568516 Opened 5 years ago Closed 5 years ago

In StaticPrefs, uint32_t cannot have a mirror type of 'never'

Categories

(Core :: Preferences: Backend, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: tjr, Assigned: n.nethercote)

Details

Attachments

(1 file)

I don't know if this is intentional (and missing documentation on why) or a bug.

Definitely sounds like a bug. I'll take a look today.

Assignee: nobody → n.nethercote

I can't reproduce the problem. I just added this entry to StaticPrefList.yaml:

- name: aaa.bbb.ccc
  type: uint32_t
  value: 123
  mirror: never

and it worked fine. And I can't see anything in generate_static_pref_list.yaml that would cause uint32_t to be treated differently to other types.

(Actually, my attempt didn't work at first because I mistyped uint32_t as uint32. Might you have done the same thing?)

Flags: needinfo?(tom)
# Dynamically tune the resolution of the timer reduction for both of the two above prefs
- name: privacy.resistFingerprinting.reduceTimerPrecision.microseconds
  type: uint32_t
  value: 1000
  mirror: never

0:08.00 /home/tom/Documents/moz/mozilla-unified-2/obj-x86_64-pc-linux-gnu/dist/include/mozilla/StaticPrefList.h:5619:1: error: use of undeclared identifier 'SetPref_uint32_t'; did you mean 'SetPref_int32_t'?
0:08.00 PREF("privacy.resistFingerprinting.reduceTimerPrecision.microseconds", uint32_t, 1000)

Flags: needinfo?(tom)

Ah, I didn't wait long enough... my build eventually failed too. The fix should be straightforward.

Turns out it's unrelated to bug 1564724. The problem would have occurred if a non-mirrored uint32_t pref was added before the YAML file was introduced.

No longer depends on: 1564724

There was a missing setter function for this combination, which hasn't been
used before.

Pushed by nnethercote@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/65edb8712385
Allow a `uint32_t` static pref with a mirror value of `never`. r=KrisWright
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: