Prevent devtools/shared & devtools/server modules from reading firefox specific prefs
Categories
(DevTools :: General, task, P3)
Tracking
(Not tracked)
People
(Reporter: jdescottes, Unassigned)
References
(Blocks 1 open bug)
Details
Modules from devtools/shared and devtools/server should never attempt to read preferences defined in browser/app/profile/firefox.js because those preferences will not be set in mobile (Fenix).
To address this we could introduce a module (devtools-shared-preferences?) to read and write prefs from devtools/shared and devtools/server and lint against a direct usage of Services.prefs APIs.
The module would contain a curated list of safe preferences, defined either in modules/libpref/init/all.js or in modules/libpref/init/StaticPrefList.yaml (roughly amounts to 70 devtools prefs right now).
We need to figure out how to handle non-devtools prefs calls. Either eslint-ignore or list some non-devtools prefs in the curated list of devtools-shared-preferences.
Ideally we would also have a similar module for client preferences, because in theory a pref should either always be read from the client or only from the server, not a mix of both. But it's a much bigger refactor, so out of scope of this initial bug.
Comment 1•4 years ago
|
||
Thanks for thinking about this Julian.
Honza
Description
•