autoconfig: Fix error due to Services import in FF 117 (MR 36)

Since Firefox 104 the Services global is available automatically and no
longer needs to be imported, and since Firefox 117 importing it is an
error.
This commit is contained in:
Ulrik de Muelenaere 2023-09-04 23:29:18 -04:00 committed by Oliver Smith
parent 9c780dabb8
commit 21163be169
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -18,7 +18,7 @@
// https://web.archive.org/web/20201018211550/https://developer.mozilla.org/en-US/docs/Archive/Add-ons/Code_snippets/File_I_O
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/Services.jsm");
const Services = globalThis.Services || Cu.import("resource://gre/modules/Services.jsm").Services; // for compatibility with FF < 104
Cu.import("resource://gre/modules/FileUtils.jsm");
var g_ff_version;