From 297eabaa99472ad93f742c2f46e3eac21f252ead Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Mon, 9 Apr 2018 08:33:14 -0400 Subject: [PALEMOON] Fix for loops in MigrationUtils.jsm (SyntaxError: missing ] after element list) --- .../palemoon/components/migration/MigrationUtils.jsm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'application/palemoon') diff --git a/application/palemoon/components/migration/MigrationUtils.jsm b/application/palemoon/components/migration/MigrationUtils.jsm index fcd73a798..882c7cf32 100644 --- a/application/palemoon/components/migration/MigrationUtils.jsm +++ b/application/palemoon/components/migration/MigrationUtils.jsm @@ -176,7 +176,13 @@ this.MigratorPrototype = { * @see nsIBrowserProfileMigrator */ getMigrateData: function MP_getMigrateData(aProfile) { - let types = [r.type for each (r in this._getMaybeCachedResources(aProfile))]; + // Tycho: let types = [r.type for each (r in this._getMaybeCachedResources(aProfile))]; + let types = []; + + for each (r in this._getMaybeCachedResources(aProfile)) { + types.push(r.type); + } + return types.reduce(function(a, b) a |= b, 0); }, @@ -192,7 +198,14 @@ this.MigratorPrototype = { throw new Error("migrate called for a non-existent source"); if (aItems != Ci.nsIBrowserProfileMigrator.ALL) - resources = [r for each (r in resources) if (aItems & r.type)]; + // Tycho: resources = [r for each (r in resources) if (aItems & r.type)]; + resources = []; + + for each (r in resources) { + if (aItems & r.type) { + resources.push(r); + } + } // Called either directly or through the bookmarks import callback. function doMigrate() { -- cgit v1.2.3