summaryrefslogtreecommitdiffstats
path: root/services/sync/modules/status.js
diff options
context:
space:
mode:
Diffstat (limited to 'services/sync/modules/status.js')
-rw-r--r--services/sync/modules/status.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/services/sync/modules/status.js b/services/sync/modules/status.js
index 100bc7965..19dff9712 100644
--- a/services/sync/modules/status.js
+++ b/services/sync/modules/status.js
@@ -4,10 +4,10 @@
this.EXPORTED_SYMBOLS = ["Status"];
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-var Cu = Components.utils;
+const Cc = Components.classes;
+const Ci = Components.interfaces;
+const Cr = Components.results;
+const Cu = Components.utils;
Cu.import("resource://services-sync/constants.js");
Cu.import("resource://gre/modules/Log.jsm");
@@ -30,7 +30,10 @@ this.Status = {
.wrappedJSObject;
let idClass = service.fxAccountsEnabled ? BrowserIDManager : IdentityManager;
this.__authManager = new idClass();
- this.__authManager.initialize();
+ // .initialize returns a promise, so we need to spin until it resolves.
+ let cb = Async.makeSpinningCallback();
+ this.__authManager.initialize().then(cb, cb);
+ cb.wait();
return this.__authManager;
},