Preferences can be defined multiple times in StatcPrefList.yaml if they have different types
Categories
(Core :: Preferences: Backend, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox70 | --- | fixed |
People
(Reporter: tjr, Assigned: n.nethercote)
Details
Attachments
(1 file)
I hadn't noticed that these were already in the .yaml file:
https://searchfox.org/mozilla-central/rev/40e889be8ff926e32f7567957f4c316f14f6fbef/modules/libpref/init/StaticPrefList.yaml#5742-5751
I had added them myself, without any error. Then when I changed my added ones' type to match the original; and I (finally) got build errors about a duplicate.
(It's possible the mirror type also needs to be the different.)
Example: this build uses this file
| Assignee | ||
Comment 1•6 years ago
|
||
Good catch, thank you for the report. The mirror value is key here.
- The generated C++ code will fail to compile in these pairings: always/always, always/once, once/once.
- The C++ code will compile ok in these pairings: always/never, once/never, never/never.
I'm not sure what the runtime behaviour will be in those cases, and I don't want to work it out :) I will change generate_static_pref_list.yaml to detect duplicates.
| Assignee | ||
Comment 2•6 years ago
|
||
Some double definitions would have caused C++ compile errors, but some would
not, and I'm not even sure what the runtime behaviour would have been in those
latter cases...
| Assignee | ||
Updated•6 years ago
|
Comment 4•6 years ago
|
||
| bugherder | ||
Description
•