diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-10-06 07:09:02 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-10-06 07:09:02 +0200 |
commit | 18473f1844a8230130e1fc23d7ebf7d33183316f (patch) | |
tree | 75d297ab7eac48e14af88e565dc1e19775de9df1 /services/sync/modules/service.js | |
parent | 0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25 (diff) | |
download | UXP-18473f1844a8230130e1fc23d7ebf7d33183316f.tar UXP-18473f1844a8230130e1fc23d7ebf7d33183316f.tar.gz UXP-18473f1844a8230130e1fc23d7ebf7d33183316f.tar.lz UXP-18473f1844a8230130e1fc23d7ebf7d33183316f.tar.xz UXP-18473f1844a8230130e1fc23d7ebf7d33183316f.zip |
Update sync client for JS changes.
Diffstat (limited to 'services/sync/modules/service.js')
-rw-r--r-- | services/sync/modules/service.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/services/sync/modules/service.js b/services/sync/modules/service.js index 637760b8f..f3837a949 100644 --- a/services/sync/modules/service.js +++ b/services/sync/modules/service.js @@ -4,10 +4,10 @@ this.EXPORTED_SYMBOLS = ["Service"]; -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; // How long before refreshing the cluster const CLUSTER_BACKOFF = 5 * 60 * 1000; // 5 minutes @@ -432,7 +432,7 @@ Sync11Service.prototype = { // Map each old pref to the current pref branch let oldPref = new Preferences(oldPrefBranch); - for each (let pref in oldPrefNames) + for (let pref of oldPrefNames) Svc.Prefs.set(pref, oldPref.get(pref)); // Remove all the old prefs and remember that we've migrated @@ -890,7 +890,7 @@ Sync11Service.prototype = { // Deletion doesn't make sense if we aren't set up yet! if (this.clusterURL != "") { // Clear client-specific data from the server, including disabled engines. - for each (let engine in [this.clientsEngine].concat(this.engineManager.getAll())) { + for (let engine of [this.clientsEngine].concat(this.engineManager.getAll())) { try { engine.removeClientData(); } catch(ex) { @@ -1497,7 +1497,7 @@ Sync11Service.prototype = { // Wipe everything we know about except meta because we just uploaded it let engines = [this.clientsEngine].concat(this.engineManager.getAll()); - let collections = [engine.name for each (engine in engines)]; + let collections = engines.map(engine => engine.name); // TODO: there's a bug here. We should be calling resetClient, no? // Generate, upload, and download new keys. Do this last so we don't wipe @@ -1657,7 +1657,7 @@ Sync11Service.prototype = { } // Have each engine drop any temporary meta data - for each (let engine in engines) { + for (let engine of engines) { engine.resetClient(); } })(); |