Commit Graph
5 Commits
Author SHA1 Message Date
Kristen Wright e18cf128f3 Bug 1577329 - Convert index.rst to markdown r=njn
Converts `modules/libpref/docs/index.rst` to .md format.

Differential Revision: https://phabricator.services.mozilla.com/D44752
2019-09-05 02:21:13 +00:00
Nicholas Nethercote 4de78da41a Bug 1572633 - Document some additional details about pref files. r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D41331
2019-08-16 07:27:22 +00:00
Tom Ritter 881691d91f Bug 1572092 - Improve pref documentation for sync r=njn
Differential Revision: https://phabricator.services.mozilla.com/D41008
2019-08-08 00:51:39 +00:00
Nicholas Nethercote 5c2e267718 Bug 1563555 - Generate static pref getters usable from Rust code. r=glandium
This patch introduces a new Rust crate called `static_prefs`.

It also changes generate_static_pref_list.py to generate two new files.

- StaticPrefsCGetters.cpp: contains C getters, which are just wrappers around
  the C++ getters. This is included into Preferences.cpp.

- static_prefs.rs: contains declarations for the C getters, plus the `pref!`
  macro which provides nice syntax for calling the C getters. This is included
  into static_prefs/src/lib.rs.

The new code is only generated for prefs marked with the new `rust` field in
the YAML. It's opt-in because there's no point generating additional code for
900+ static prefs when only about 20 are currently used from Rust.

This patch only marks a single pref (`browser.display.document_color_use`) with
`rust: true`. That pref isn't accessed from Rust code in this patch, but it's
necessary because the generated Rust code is invalid if there are zero
Rust-accessed prefs. (The next patch will access that pref and others from Rust
code.

Differential Revision: https://phabricator.services.mozilla.com/D40791
2019-08-07 05:16:55 +00:00
Nicholas Nethercote b15904585a Bug 1567074 - Document libpref properly. r=jya
This is a combination of the All About Prefs google doc and kmag's description
of the shared memory work in
https://bugzilla.mozilla.org/show_bug.cgi?id=1471025#c95, with some updates and
tweaks.

Differential Revision: https://phabricator.services.mozilla.com/D38611
2019-08-01 02:11:07 +00:00