Closed Bug 1564724 Opened 3 months ago Closed 2 months ago

Generate StaticPrefList.h

Categories

(Core :: Preferences: Backend, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: njn, Assigned: njn)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

Generating StaticPrefList.h will help with some other things, like:

  • splitting it into pieces to reduce recompilations (bug 1563139);
  • improving Rust access to prefs (bug 1563555);
  • making it harder to mess up static prefs (previously attempted in bug 1563146)
Blocks: 1563139, 1563555

Minor things to ease the transition to StaticPrefList.yaml.

  • Rename apz_touch_drag_enabled() to the correct apz_drag_touch_enabled().

  • Change some trailing C-style comments to C++-style comments. This makes life
    easier for the script I wrote to convert StaticPrefList.h to
    StaticPrefList.yaml, which will be used for the next patch.

  • Avoid comments on #define lines, because they aren't handled in the YAML
    input.

  • Convert a multi-line #if condition to a single line, because
    Preprocessor.py doesn't handle multi-line conditions.

  • Remove one unnecessary #undef PREF_VALUE directive.

  • Move intl.charset.detector.iso2022jp.allowed to the correct section, so the
    YAML processing script won't complain.

  • Change an int pref to int32_t, again so the YAML processing script won't
    complain.

Attachment #9077013 - Attachment description: Bug 1564724 - Generate StaticPrefList.h. r=glandium → Bug 1564724 - Generate StaticPrefList.h from StaticPrefList.yaml. r=glandium

glandium: In case it's not clear, the order of these patches is "Tweak...", Generate...", "Remove...", but Phabricator isn't showing that because I originally pushed just the "Generate..." patch.

Also note that the "Generate..." patch has a couple of njn: comments reordering things in StaticPrefList.h. Once bug 1565110 lands they will go away.

Depends on: 1565110
Attachment #9077576 - Attachment mime type: text/x-python → text/plain

Also note that the "Generate..." patch has a couple of njn: comments reordering things in StaticPrefList.h. Once bug 1565110 lands they will go away.

Bug 1565110 landed, and I have updated the loaded patches accordingly.

Blocks: 1566315
Depends on: 1560183, 1566720
Pushed by nnethercote@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3d0e35ab6850
Generate StaticPrefList.h from StaticPrefList.yaml. r=glandium
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Assignee: nobody → n.nethercote
Pushed by nnethercote@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5382cec9e306
Remove the old hand-written StaticPrefList.h. r=glandium
Blocks: 1568516
No longer blocks: 1568516
You need to log in before you can comment on or make changes to this bug.