Bug 1541508 - Use Services.env in widget/ r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D160154
This commit is contained in:
Barret Rennie 2022-11-02 02:08:59 +00:00
Родитель 3250d6ee4d
Коммит 12a2e92d31
1 изменённых файлов: 1 добавлений и 4 удалений

Просмотреть файл

@ -59,10 +59,7 @@ add_task(async () => {
// MOZ_HEADLESS is set in content processes with GTK regardless of the
// headless state of the parent process. Check the parent state.
const headless = await SpecialPowers.spawnChrome([], function get_headless() {
const env = Cc["@mozilla.org/process/environment;1"].getService(
Ci.nsIEnvironment
);
return env.get("MOZ_HEADLESS");
return Services.env.get("MOZ_HEADLESS");
});
// LookAndFeel::TextScaleFactor::FloatID is implemented only for WINNT and
// GTK. ui.textScaleFactor happens to scale CSS pixels on other platforms