mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 21:28:55 +00:00
Bug 966823 - ensure checking if there is a login error doesn't initialize sync too early. r=ttaubert
This commit is contained in:
parent
dc7188dcc2
commit
1fd7d74a4e
@ -48,6 +48,14 @@ let gFxAccounts = {
|
||||
},
|
||||
|
||||
get loginFailed() {
|
||||
// Referencing Weave.Service will implicitly initialize sync, and we don't
|
||||
// want to force that - so first check if it is ready.
|
||||
let service = Cc["@mozilla.org/weave/service;1"]
|
||||
.getService(Components.interfaces.nsISupports)
|
||||
.wrappedJSObject;
|
||||
if (!service.ready) {
|
||||
return false;
|
||||
}
|
||||
return Weave.Service.identity.readyToAuthenticate &&
|
||||
Weave.Status.login != Weave.LOGIN_SUCCEEDED;
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user