Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
#8539 Config preferences backend restructure #22923
A procedural macro for generating static structures for use as the backend for config preferences, as well a mapping from string names to accessors.
Preferences can be accessed and updated via a map-like interface with
I have added the choice to use
I have a few outstanding problems or questions:
Heads up! This PR modifies the following files:
3 times, most recently
Feb 27, 2019
emilio left a comment
It is a bit unfortunate to have to pay the cost of locking and arc-cloning to access simple prefs. Ideally bool prefs should be just a relaxed atomic read. Though given this simplifies the API and makes it easy to change it under the hood, it may be worth to land it and improve that as a follow-up...
The existing implementation stores the preferences in a
The choice was between locking the entire structure or locking individual preferences, and I went with the simplest one. Since most code can use the macros, as you say, it can be changed under the hood.
referenced this pull request
Mar 1, 2019
1 similar comment
added a commit
this pull request
Mar 19, 2019
Mar 20, 2019
@jdm I've come across some mention of prefs in some Python tests, e.g: https://github.com/servo/servo/blob/master/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_wpttest.py#L14 :
I'm not exactly sure what these are doing though, or how to make sure that I've run them properly. Are these trying to set and reset a pref called "a"?