summaryrefslogtreecommitdiffstats
path: root/services/sync/modules/util.js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-10-06 07:09:02 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-10-06 07:09:02 +0200
commit18473f1844a8230130e1fc23d7ebf7d33183316f (patch)
tree75d297ab7eac48e14af88e565dc1e19775de9df1 /services/sync/modules/util.js
parent0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25 (diff)
downloadUXP-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/util.js')
-rw-r--r--services/sync/modules/util.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/services/sync/modules/util.js b/services/sync/modules/util.js
index 67cc3f063..b063a29ac 100644
--- a/services/sync/modules/util.js
+++ b/services/sync/modules/util.js
@@ -4,7 +4,7 @@
this.EXPORTED_SYMBOLS = ["XPCOMUtils", "Services", "Utils", "Async", "Svc", "Str"];
-const {classes: Cc, interfaces: Ci, results: Cr, utils: Cu} = Components;
+var {classes: Cc, interfaces: Ci, results: Cr, utils: Cu} = Components;
Cu.import("resource://gre/modules/Log.jsm");
Cu.import("resource://services-common/observers.js");
@@ -338,12 +338,14 @@ this.Utils = {
try {
json = yield CommonUtils.readJSON(path);
- } catch (e if e instanceof OS.File.Error && e.becauseNoSuchFile) {
- // Ignore non-existent files.
} catch (e) {
- if (that._log) {
- that._log.debug("Failed to load json: " +
- CommonUtils.exceptionStr(e));
+ if (e instanceof OS.File.Error && e.becauseNoSuchFile) {
+ // Ignore non-existent files, but explicitly return null.
+ json = null;
+ } else {
+ if (that._log) {
+ that._log.debug("Failed to load json", e);
+ }
}
}
@@ -690,7 +692,7 @@ Svc.Prefs = new Preferences(PREFS_BRANCH);
Svc.DefaultPrefs = new Preferences({branch: PREFS_BRANCH, defaultBranch: true});
Svc.Obs = Observers;
-let _sessionCID = Services.appinfo.ID == SEAMONKEY_ID ?
+var _sessionCID = Services.appinfo.ID == SEAMONKEY_ID ?
"@mozilla.org/suite/sessionstore;1" :
"@mozilla.org/browser/sessionstore;1";