Bug 981172 - have bid_identity fire a notification on login error. r=ckarlof
authorMark Hammond <mhammond@skippinet.com.au>
Mon, 10 Mar 2014 11:54:46 -0700
changeset 191192 dbc54ea4a40750acadd85f9225dae67767e6234f
parent 191191 88184c55d33510529026f467babf602a79cda44c
child 191193 30d1f3ee8ad398014ca8b89b7b4975c9d509033f
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersckarlof
bugs981172
milestone30.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 981172 - have bid_identity fire a notification on login error. r=ckarlof
services/sync/modules/browserid_identity.js
--- a/services/sync/modules/browserid_identity.js
+++ b/services/sync/modules/browserid_identity.js
@@ -511,16 +511,17 @@ this.BrowserIDManager.prototype = {
           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;
         this._syncKeyBundle = null;
         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()) {