Bug 981172 - Have bid_identity fire a notification on login error. r=ckarlof, a=sledru
authorMark Hammond <mhammond@skippinet.com.au>
Mon, 10 Mar 2014 11:54:46 -0700
changeset 183354 dd9e870382e495a75f61c33a888f53e27f828be8
parent 183353 55b35360ee1d6ff47ccde1d798f8e8ec9ad816c1
child 183355 af4a786a3e2ec67d2a6cf74f78cad7afe2c1e339
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersckarlof, sledru
bugs981172
milestone29.0a2
Bug 981172 - Have bid_identity fire a notification on login error. r=ckarlof, a=sledru
services/sync/modules/browserid_identity.js
--- a/services/sync/modules/browserid_identity.js
+++ b/services/sync/modules/browserid_identity.js
@@ -509,16 +509,17 @@ this.BrowserIDManager.prototype = {
           // for now assume it is just a transient network related problem.
           this._authFailureReason = LOGIN_FAILED_NETWORK_ERROR;
         }
         // Drop the sync key bundle, but still expect to have one.
         // This will arrange for us to be in the right 'currentAuthState'
         // such that UI will show the right error.
         this._shouldHaveSyncKeyBundle = true;
         Weave.Status.login = this._authFailureReason;
+        Services.obs.notifyObservers(null, "weave:service:login:error", null);
         throw err;
       });
   },
 
   // Returns a promise that is resolved when we have a valid token for the
   // current user stored in this._token.  When resolved, this._token is valid.
   _ensureValidToken: function() {
     if (this.hasValidToken()) {