зеркало из https://github.com/mozilla/gecko-dev.git
7974362afd
Currently it's completely unclear at use sites that the getters for `once` static prefs return the pref value from startup, rather than the current pref value. (Bugs have been caused by this.) This commit improves things by changing the getter name to make it clear that the pref value obtained is from startup. This required changing things within libpref so it distinguishes between the "base id" (`foo_bar`) and the "full id" (`foo_bar` or `foo_bar_DoNotUseDirectly` or `foo_bar_AtStartup` or `foo_bar_AtStartup_DoNotUseDirectly`; the name used depends on the `mirror` and `do_not_use_directly` values in the YAML definition.) The "full id" is used in most places, while the "base id" is used for the `GetPrefName_*` and `GetPrefDefault_*` functions. (This is a nice demonstration of the benefits of the YAML file, BTW. Making this change with the old code would have involved adding an entry to every single pref in StaticPrefList.h.) The patch also rejigs the comment at the top of StaticPrefList.yaml, to clarify some things. Differential Revision: https://phabricator.services.mozilla.com/D38604 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
external_api | ||
ipc | ||
service | ||
vrhost | ||
VRDisplayClient.cpp | ||
VRDisplayClient.h | ||
VRDisplayPresentation.cpp | ||
VRDisplayPresentation.h | ||
VRManager.cpp | ||
VRManager.h | ||
VRPuppetCommandBuffer.cpp | ||
VRPuppetCommandBuffer.h | ||
VRServiceHost.cpp | ||
VRServiceHost.h | ||
VRShMem.cpp | ||
VRShMem.h | ||
VRThread.cpp | ||
VRThread.h | ||
components.conf | ||
gfxVR.cpp | ||
gfxVR.h | ||
gfxVRMutex.h | ||
moz.build | ||
nsFxrCommandLineHandler.cpp | ||
nsFxrCommandLineHandler.h |