summaryrefslogtreecommitdiffstats
path: root/toolkit
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-02-10 16:11:32 -0500
committerMatt A. Tobin <email@mattatobin.com>2018-02-10 16:11:32 -0500
commitd836c9e48815f6fb024fd46582142bfc3aa45419 (patch)
treee19a50e02f06e266894af46ec9174e0ecc694a22 /toolkit
parente2ddd038719a70ec4f3ce4b467ce27f148b26373 (diff)
downloadUXP-d836c9e48815f6fb024fd46582142bfc3aa45419.tar
UXP-d836c9e48815f6fb024fd46582142bfc3aa45419.tar.gz
UXP-d836c9e48815f6fb024fd46582142bfc3aa45419.tar.lz
UXP-d836c9e48815f6fb024fd46582142bfc3aa45419.tar.xz
UXP-d836c9e48815f6fb024fd46582142bfc3aa45419.zip
Fix for loops in XPIProvider.jsm (SyntaxError: missing ] after element list)
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/mozapps/extensions/internal/XPIProvider.jsm28
1 files changed, 22 insertions, 6 deletions
diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
index 76b4e653b..975448fcc 100644
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -3855,7 +3855,12 @@ this.XPIProvider = {
*/
getAddonsByTypes: function XPI_getAddonsByTypes(aTypes, aCallback) {
XPIDatabase.getVisibleAddons(aTypes, function getAddonsByTypes_getVisibleAddons(aAddons) {
- aCallback([createWrapper(a) for each (a in aAddons)]);
+ // Tycho: aCallback([createWrapper(a) for each (a in aAddons)]);
+ let result = [];
+ for each(let a in aAddons) {
+ result.push(createWrapper(a));
+ }
+ aCallback(result);
});
},
@@ -3885,7 +3890,12 @@ this.XPIProvider = {
function XPI_getAddonsWithOperationsByTypes(aTypes, aCallback) {
XPIDatabase.getVisibleAddonsWithPendingOperations(aTypes,
function getAddonsWithOpsByTypes_getVisibleAddonsWithPendingOps(aAddons) {
- let results = [createWrapper(a) for each (a in aAddons)];
+ // Tycho: let results = [createWrapper(a) for each (a in aAddons)];
+ let results = [];
+ for each(let a in aAddons) {
+ results.push(createWrapper(a));
+ }
+
XPIProvider.installs.forEach(function(aInstall) {
if (aInstall.state == AddonManager.STATE_INSTALLED &&
!(aInstall.addon.inDatabase))
@@ -4809,12 +4819,12 @@ this.XPIProvider = {
function getHashStringForCrypto(aCrypto) {
// return the two-digit hexadecimal code for a byte
- function toHexString(charCode)
- ("0" + charCode.toString(16)).slice(-2);
+ let toHexString = charCode => ("0" + charCode.toString(16)).slice(-2);
// convert the binary hash data to a hex string.
let binary = aCrypto.finish(false);
- return [toHexString(binary.charCodeAt(i)) for (i in binary)].join("").toLowerCase()
+ let hash = Array.from(binary, c => toHexString(c.charCodeAt(0)))
+ return hash.join("").toLowerCase();
}
/**
@@ -6111,7 +6121,13 @@ function AddonInstallWrapper(aInstall) {
this.__defineGetter__("linkedInstalls", function AIW_linkedInstallsGetter() {
if (!aInstall.linkedInstalls)
return null;
- return [i.wrapper for each (i in aInstall.linkedInstalls)];
+ // Tycho: return [i.wrapper for each (i in aInstall.linkedInstalls)];
+ let result = [];
+ for each (let i in aInstall.linkedInstalls) {
+ result.push(i.wrapper);
+ }
+
+ return result;
});
this.install = function AIW_install() {