summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-05-28 21:17:50 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-05-28 21:17:50 +0200
commit170aaecc47c7f6bb9ddb64fc0d61beec76cca65b (patch)
tree08143b5b4eb633abbb55f66b411ca908757df689
parentc8409cc60bd54586e4a484c7ad15a2c408198dd7 (diff)
downloadUXP-170aaecc47c7f6bb9ddb64fc0d61beec76cca65b.tar
UXP-170aaecc47c7f6bb9ddb64fc0d61beec76cca65b.tar.gz
UXP-170aaecc47c7f6bb9ddb64fc0d61beec76cca65b.tar.lz
UXP-170aaecc47c7f6bb9ddb64fc0d61beec76cca65b.tar.xz
UXP-170aaecc47c7f6bb9ddb64fc0d61beec76cca65b.zip
[PALEMOON] [frontend vs backend] Part 2: Mass-replace global-scope let/const with var in Pale Moon and TychoAM
Issue #155 Part 2 for: https://github.com/MoonchildProductions/UXP/commit/931950a880b3550490422b1855c509be10586858
-rw-r--r--application/palemoon/base/content/browser.js4
-rw-r--r--application/palemoon/base/content/pageinfo/pageInfo.js2
-rw-r--r--application/palemoon/base/content/sanitizeDialog.js4
-rw-r--r--application/palemoon/base/content/sync/aboutSyncTabs.js2
-rw-r--r--application/palemoon/base/content/sync/addDevice.js6
-rw-r--r--application/palemoon/base/content/sync/genericChange.js4
-rw-r--r--application/palemoon/base/content/sync/setup.js8
-rw-r--r--application/palemoon/components/distribution.js8
-rw-r--r--application/palemoon/components/sessionstore/content/aboutSessionRestore.js6
-rw-r--r--application/palemoon/components/sessionstore/content/content-sessionStore.js2
-rw-r--r--toolkit/mozapps/extensions/content/extensions.js8
-rw-r--r--toolkit/mozapps/extensions/content/newaddon.js6
-rw-r--r--toolkit/mozapps/extensions/content/selectAddons.js4
-rw-r--r--toolkit/mozapps/extensions/internal/Content.js2
-rw-r--r--toolkit/mozapps/extensions/internal/GMPProvider.jsm7
-rw-r--r--toolkit/mozapps/extensions/internal/XPIProvider.jsm1
-rw-r--r--toolkit/mozapps/extensions/internal/XPIProviderUtils.js8
17 files changed, 43 insertions, 39 deletions
diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js
index c8f287693..4bdac7850 100644
--- a/application/palemoon/base/content/browser.js
+++ b/application/palemoon/base/content/browser.js
@@ -3098,6 +3098,8 @@ const BrowserSearch = {
},
};
+XPCOMUtils.defineConstant(this, "BrowserSearch", BrowserSearch);
+
function FillHistoryMenu(aParent) {
// Lazily add the hover listeners on first showing and never remove them
if (!aParent.hasStatusListener) {
@@ -6770,7 +6772,7 @@ function getTabModalPromptBox(aWindow) {
function getBrowser() gBrowser;
function getNavToolbox() gNavToolbox;
-let gPrivateBrowsingUI = {
+var gPrivateBrowsingUI = {
init: function PBUI_init() {
// Do nothing for normal windows
if (!PrivateBrowsingUtils.isWindowPrivate(window)) {
diff --git a/application/palemoon/base/content/pageinfo/pageInfo.js b/application/palemoon/base/content/pageinfo/pageInfo.js
index 6b02bc370..600174ad9 100644
--- a/application/palemoon/base/content/pageinfo/pageInfo.js
+++ b/application/palemoon/base/content/pageinfo/pageInfo.js
@@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
-const Cu = Components.utils;
+var Cu = Components.utils;
Cu.import("resource://gre/modules/LoadContextInfo.jsm");
Cu.import("resource://gre/modules/Services.jsm");
diff --git a/application/palemoon/base/content/sanitizeDialog.js b/application/palemoon/base/content/sanitizeDialog.js
index 18df5e4a4..786113288 100644
--- a/application/palemoon/base/content/sanitizeDialog.js
+++ b/application/palemoon/base/content/sanitizeDialog.js
@@ -3,8 +3,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-const Cc = Components.classes;
-const Ci = Components.interfaces;
+var Cc = Components.classes;
+var Ci = Components.interfaces;
var gSanitizePromptDialog = {
diff --git a/application/palemoon/base/content/sync/aboutSyncTabs.js b/application/palemoon/base/content/sync/aboutSyncTabs.js
index bc624a459..410494b5b 100644
--- a/application/palemoon/base/content/sync/aboutSyncTabs.js
+++ b/application/palemoon/base/content/sync/aboutSyncTabs.js
@@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-const Cu = Components.utils;
+var Cu = Components.utils;
Cu.import("resource://services-common/utils.js");
Cu.import("resource://services-sync/main.js");
diff --git a/application/palemoon/base/content/sync/addDevice.js b/application/palemoon/base/content/sync/addDevice.js
index 40862a791..0390d4397 100644
--- a/application/palemoon/base/content/sync/addDevice.js
+++ b/application/palemoon/base/content/sync/addDevice.js
@@ -2,9 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-const Ci = Components.interfaces;
-const Cc = Components.classes;
-const Cu = Components.utils;
+var Ci = Components.interfaces;
+var Cc = Components.classes;
+var Cu = Components.utils;
Cu.import("resource://services-sync/main.js");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
diff --git a/application/palemoon/base/content/sync/genericChange.js b/application/palemoon/base/content/sync/genericChange.js
index 0c6dc145e..df6639178 100644
--- a/application/palemoon/base/content/sync/genericChange.js
+++ b/application/palemoon/base/content/sync/genericChange.js
@@ -2,8 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-const Ci = Components.interfaces;
-const Cc = Components.classes;
+var Ci = Components.interfaces;
+var Cc = Components.classes;
Components.utils.import("resource://services-sync/main.js");
Components.utils.import("resource://gre/modules/Services.jsm");
diff --git a/application/palemoon/base/content/sync/setup.js b/application/palemoon/base/content/sync/setup.js
index 99faa038e..e8d67a5f6 100644
--- a/application/palemoon/base/content/sync/setup.js
+++ b/application/palemoon/base/content/sync/setup.js
@@ -2,10 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-const Ci = Components.interfaces;
-const Cc = Components.classes;
-const Cr = Components.results;
-const Cu = Components.utils;
+var Ci = Components.interfaces;
+var Cc = Components.classes;
+var Cr = Components.results;
+var Cu = Components.utils;
// page consts
diff --git a/application/palemoon/components/distribution.js b/application/palemoon/components/distribution.js
index b44b5bed3..d3300604e 100644
--- a/application/palemoon/components/distribution.js
+++ b/application/palemoon/components/distribution.js
@@ -4,10 +4,10 @@
this.EXPORTED_SYMBOLS = [ "DistributionCustomizer" ];
-const Ci = Components.interfaces;
-const Cc = Components.classes;
-const Cr = Components.results;
-const Cu = Components.utils;
+var Ci = Components.interfaces;
+var Cc = Components.classes;
+var Cr = Components.results;
+var Cu = Components.utils;
const DISTRIBUTION_CUSTOMIZATION_COMPLETE_TOPIC =
"distribution-customization-complete";
diff --git a/application/palemoon/components/sessionstore/content/aboutSessionRestore.js b/application/palemoon/components/sessionstore/content/aboutSessionRestore.js
index cae3bf4de..2459b67f5 100644
--- a/application/palemoon/components/sessionstore/content/aboutSessionRestore.js
+++ b/application/palemoon/components/sessionstore/content/aboutSessionRestore.js
@@ -2,9 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cu = Components.utils;
+var Cc = Components.classes;
+var Ci = Components.interfaces;
+var Cu = Components.utils;
var gStateObject;
var gTreeData;
diff --git a/application/palemoon/components/sessionstore/content/content-sessionStore.js b/application/palemoon/components/sessionstore/content/content-sessionStore.js
index bdf0fef0c..e3e956ef2 100644
--- a/application/palemoon/components/sessionstore/content/content-sessionStore.js
+++ b/application/palemoon/components/sessionstore/content/content-sessionStore.js
@@ -10,7 +10,7 @@ function debug(msg) {
* Listens for and handles content events that we need for the
* session store service to be notified of state changes in content.
*/
-let EventListener = {
+var EventListener = {
DOM_EVENTS: [
"pageshow", "change", "input"
diff --git a/toolkit/mozapps/extensions/content/extensions.js b/toolkit/mozapps/extensions/content/extensions.js
index fc4392231..1e185f879 100644
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -4,10 +4,10 @@
"use strict";
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cu = Components.utils;
-const Cr = Components.results;
+var Cc = Components.classes;
+var Ci = Components.interfaces;
+var Cu = Components.utils;
+var Cr = Components.results;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
diff --git a/toolkit/mozapps/extensions/content/newaddon.js b/toolkit/mozapps/extensions/content/newaddon.js
index 2b2a54af5..e45b3c1cc 100644
--- a/toolkit/mozapps/extensions/content/newaddon.js
+++ b/toolkit/mozapps/extensions/content/newaddon.js
@@ -2,9 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cu = Components.utils;
+var Cc = Components.classes;
+var Ci = Components.interfaces;
+var Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/AddonManager.jsm");
diff --git a/toolkit/mozapps/extensions/content/selectAddons.js b/toolkit/mozapps/extensions/content/selectAddons.js
index f80932b3f..01b9030ee 100644
--- a/toolkit/mozapps/extensions/content/selectAddons.js
+++ b/toolkit/mozapps/extensions/content/selectAddons.js
@@ -10,8 +10,8 @@ Components.utils.import("resource://gre/modules/AddonManager.jsm");
Components.utils.import("resource://gre/modules/addons/AddonRepository.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
-const Cc = Components.classes;
-const Ci = Components.interfaces;
+var Cc = Components.classes;
+var Ci = Components.interfaces;
var gView = null;
diff --git a/toolkit/mozapps/extensions/internal/Content.js b/toolkit/mozapps/extensions/internal/Content.js
index 61a8b0323..9ab3b9ad6 100644
--- a/toolkit/mozapps/extensions/internal/Content.js
+++ b/toolkit/mozapps/extensions/internal/Content.js
@@ -6,7 +6,7 @@
(function() {
-const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
+var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
var {Services} = Cu.import("resource://gre/modules/Services.jsm", {});
diff --git a/toolkit/mozapps/extensions/internal/GMPProvider.jsm b/toolkit/mozapps/extensions/internal/GMPProvider.jsm
index 52affa9ba..25651f1b8 100644
--- a/toolkit/mozapps/extensions/internal/GMPProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/GMPProvider.jsm
@@ -4,9 +4,9 @@
"use strict";
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cu = Components.utils;
+var Cc = Components.classes;
+var Ci = Components.interfaces;
+var Cu = Components.utils;
this.EXPORTED_SYMBOLS = [];
@@ -58,6 +58,7 @@ const GMP_PLUGINS = [
optionsURL: "chrome://mozapps/content/extensions/gmpPrefs.xul",
isEME: true
}];
+XPCOMUtils.defineConstant(this, "GMP_PLUGINS", GMP_PLUGINS);
XPCOMUtils.defineLazyGetter(this, "pluginsBundle",
() => Services.strings.createBundle("chrome://global/locale/plugins.properties"));
diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
index 5b3585cd8..b522bd3ae 100644
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -144,6 +144,7 @@ const FIREFOX_APPCOMPATVERSION = "56.9"
// The value for this is in Makefile.in
#expand const DB_SCHEMA = __MOZ_EXTENSIONS_DB_SCHEMA__;
+XPCOMUtils.defineConstant(this, "DB_SCHEMA", DB_SCHEMA);
#ifdef MOZ_DEVTOOLS
const NOTIFICATION_TOOLBOXPROCESS_LOADED = "ToolboxProcessLoaded";
#endif
diff --git a/toolkit/mozapps/extensions/internal/XPIProviderUtils.js b/toolkit/mozapps/extensions/internal/XPIProviderUtils.js
index 6b37ed640..f2420bd1a 100644
--- a/toolkit/mozapps/extensions/internal/XPIProviderUtils.js
+++ b/toolkit/mozapps/extensions/internal/XPIProviderUtils.js
@@ -4,10 +4,10 @@
"use strict";
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cr = Components.results;
-const Cu = Components.utils;
+var Cc = Components.classes;
+var Ci = Components.interfaces;
+var Cr = Components.results;
+var Cu = Components.utils;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");