Open Bug 1660182 Opened 4 years ago Updated 4 years ago

Prevent devtools/shared & devtools/server modules from reading firefox specific prefs

Categories

(DevTools :: General, task, P3)

task

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.

Thanks for thinking about this Julian.

Honza

Severity: -- → S3
Priority: -- → P3
See Also: → 1662059
See Also: → 1662067
You need to log in before you can comment on or make changes to this bug.