summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorJeremy Andrews <athenian200@outlook.com>2022-10-06 03:21:53 -0500
committerJeremy Andrews <athenian200@outlook.com>2022-10-06 03:27:46 -0500
commit4ba7e05b96a30cb2abff2db1e2f9dd8f8a56cb3e (patch)
tree8c7945b4f7ab055d7f326fa28a11f7c547ffb68c /toolkit
parent2dc264047edad770c1ac4513a1e7844ef4365fa7 (diff)
downloaduxp-4ba7e05b96a30cb2abff2db1e2f9dd8f8a56cb3e.tar.gz
Issue #2012 - Follow-up: Make sure Services.jsm is imported earlier.
I didn't catch this because I am used to the .jsm files being imported near the top of the file, not later on. This is the case in the other two files I worked on. Only AddonUpdateChecker.jsm seems to have this problem.
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm6
1 files changed, 4 insertions, 2 deletions
diff --git a/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm b/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm
index 11db378eeb..617d28a9de 100644
--- a/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm
+++ b/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm
@@ -15,6 +15,9 @@ const Cu = Components.utils;
this.EXPORTED_SYMBOLS = [ "AddonUpdateChecker" ];
+Components.utils.import("resource://gre/modules/Services.jsm");
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+
const TIMEOUT = 60 * 1000;
const PREFIX_NS_RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
const PREFIX_NS_EM = "http://www.mozilla.org/2004/em-rdf#";
@@ -30,8 +33,7 @@ const APPCOMPATVERSION = Services.prefs.getCharPref("extensions.g
const PREF_UPDATE_REQUIREBUILTINCERTS = "extensions.update.requireBuiltInCerts";
const PREF_EM_MIN_COMPAT_APP_VERSION = "extensions.minCompatibleAppVersion";
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+
XPCOMUtils.defineLazyModuleGetter(this, "AddonManager",
"resource://gre/modules/AddonManager.jsm");