Bug 1034229 - Fire oncancel() when passed to request() with refreshAuthentication. r=jedp
authorSam Penrose <spenrose@mozilla.com>
Thu, 03 Jul 2014 13:23:12 -0700
changeset 192341 745840b2693f805b7dec1bee72cf45173047c7ca
parent 192340 928ae2f662582694f5ff5e6fa666898837a3a8b7
child 192342 eba5d7aa80b0c6894662146bbf90d03e9ffbaee3
child 192397 74d9bc471cc586f76db3ba6201882bd8992aa46e
push id8622
push usercbook@mozilla.com
push dateFri, 04 Jul 2014 08:00:38 +0000
treeherderb2g-inbound@745840b2693f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjedp
bugs1034229
milestone33.0a1
Bug 1034229 - Fire oncancel() when passed to request() with refreshAuthentication. r=jedp
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);
       }
     );
   },
 
   /**