summaryrefslogtreecommitdiffstats
path: root/application/palemoon/components/nsBrowserGlue.js
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-04-07 09:21:20 -0400
committerMatt A. Tobin <email@mattatobin.com>2018-04-07 09:21:20 -0400
commit11d5826ae102b4b2defedfc1a46f0358adde5bc2 (patch)
tree5df9fedbfc78509bcc5a8b42d69f6064266c759d /application/palemoon/components/nsBrowserGlue.js
parenteb09a5738ccdc46202b597570a878d72f22b16b0 (diff)
downloadUXP-11d5826ae102b4b2defedfc1a46f0358adde5bc2.tar
UXP-11d5826ae102b4b2defedfc1a46f0358adde5bc2.tar.gz
UXP-11d5826ae102b4b2defedfc1a46f0358adde5bc2.tar.lz
UXP-11d5826ae102b4b2defedfc1a46f0358adde5bc2.tar.xz
UXP-11d5826ae102b4b2defedfc1a46f0358adde5bc2.zip
[PALEMOON] Use an array for Lazy Module Getters
Diffstat (limited to 'application/palemoon/components/nsBrowserGlue.js')
-rw-r--r--application/palemoon/components/nsBrowserGlue.js74
1 files changed, 21 insertions, 53 deletions
diff --git a/application/palemoon/components/nsBrowserGlue.js b/application/palemoon/components/nsBrowserGlue.js
index 5b7fdde33..0656f269d 100644
--- a/application/palemoon/components/nsBrowserGlue.js
+++ b/application/palemoon/components/nsBrowserGlue.js
@@ -13,59 +13,27 @@ const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "AddonManager",
- "resource://gre/modules/AddonManager.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
- "resource://gre/modules/NetUtil.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "UserAgentOverrides",
- "resource://gre/modules/UserAgentOverrides.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
- "resource://gre/modules/FileUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
- "resource://gre/modules/PlacesUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "BookmarkHTMLUtils",
- "resource://gre/modules/BookmarkHTMLUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "BookmarkJSONUtils",
- "resource://gre/modules/BookmarkJSONUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "PageThumbs",
- "resource://gre/modules/PageThumbs.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "NewTabUtils",
- "resource://gre/modules/NewTabUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "BrowserNewTabPreloader",
- "resource:///modules/BrowserNewTabPreloader.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "webrtcUI",
- "resource:///modules/webrtcUI.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
- "resource://gre/modules/PrivateBrowsingUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "RecentWindow",
- "resource:///modules/RecentWindow.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "Task",
- "resource://gre/modules/Task.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "PlacesBackups",
- "resource://gre/modules/PlacesBackups.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "OS",
- "resource://gre/modules/osfile.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "LoginManagerParent",
- "resource://gre/modules/LoginManagerParent.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "FormValidationHandler",
- "resource:///modules/FormValidationHandler.jsm");
+// Define Lazy Module Gitters
+[
+ ["AddonManager", "resource://gre/modules/AddonManager.jsm"],
+ ["NetUtil", "resource://gre/modules/NetUtil.jsm"],
+ ["UserAgentOverrides", "resource://gre/modules/UserAgentOverrides.jsm"],
+ ["FileUtils", "resource://gre/modules/FileUtils.jsm"],
+ ["PlacesUtils", "resource://gre/modules/PlacesUtils.jsm"],
+ ["BookmarkHTMLUtils", "resource://gre/modules/BookmarkHTMLUtils.jsm"],
+ ["BookmarkJSONUtils", "resource://gre/modules/BookmarkJSONUtils.jsm"],
+ ["PageThumbs", "resource://gre/modules/PageThumbs.jsm"],
+ ["NewTabUtils", "resource://gre/modules/NewTabUtils.jsm"],
+ ["BrowserNewTabPreloader", "resource:///modules/BrowserNewTabPreloader.jsm"],
+ ["webrtcUI", "resource:///modules/webrtcUI.jsm"],
+ ["PrivateBrowsingUtils", "resource://gre/modules/PrivateBrowsingUtils.jsm"],
+ ["RecentWindow", "resource:///modules/RecentWindow.jsm"],
+ ["Task", "resource://gre/modules/Task.jsm"],
+ ["PlacesBackups", "resource://gre/modules/PlacesBackups.jsm"],
+ ["OS", "resource://gre/modules/osfile.jsm"],
+ ["LoginManagerParent", "resource://gre/modules/LoginManagerParent.jsm"],
+ ["FormValidationHandler", "resource:///modules/FormValidationHandler.jsm"],
+].forEach(([name, resource]) => XPCOMUtils.defineLazyModuleGetter(this, name, resource));
const PREF_PLUGINS_NOTIFYUSER = "plugins.update.notifyUser";
const PREF_PLUGINS_UPDATEURL = "plugins.update.url";