Bug 1034229 - Fire oncancel() when passed to request() with refreshAuthentication. r=jedp, a=2.0+
authorSam Penrose <spenrose@mozilla.com>
Thu, 03 Jul 2014 13:23:12 -0700
changeset 207685 d8dd1845628e0d82caea40cfa7707ac4d8f56b4f
parent 207684 2ed0f836226cd560047c38bf21dcf944ef1d0fb2
child 207686 3b3b7dd57218036beefcf3ac2aa78b5274b8808a
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjedp, 2
bugs1034229
milestone32.0a2
Bug 1034229 - Fire oncancel() when passed to request() with refreshAuthentication. r=jedp, a=2.0+
toolkit/identity/FirefoxAccounts.jsm
--- a/toolkit/identity/FirefoxAccounts.jsm
+++ b/toolkit/identity/FirefoxAccounts.jsm
@@ -182,17 +182,17 @@ FxAccountsService.prototype = {
     this.fxAccountsManager.getAssertion(rp.audience, options).then(
       data => {
         log.debug("got assertion for " + rp.audience + ": " + data);
         this.doLogin(aRPId, data);
       },
       error => {
         log.error("get assertion failed: " + JSON.stringify(error));
         // Cancellation is passed through an error channel; here we reroute.
-        if (error.details && (error.details.error == "DIALOG_CLOSED_BY_USER")) {
+        if (error.error && (error.error.details == "DIALOG_CLOSED_BY_USER")) {
           return this.doCancel(aRPId);
         }
         this.doError(aRPId, error);
       }
     );
   },
 
   /**