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 192384 745840b2693f805b7dec1bee72cf45173047c7ca
parent 192383 928ae2f662582694f5ff5e6fa666898837a3a8b7
child 192385 74d9bc471cc586f76db3ba6201882bd8992aa46e
child 192538 eba5d7aa80b0c6894662146bbf90d03e9ffbaee3
push id27083
push usercbook@mozilla.com
push dateFri, 04 Jul 2014 12:02:01 +0000
treeherdermozilla-central@74d9bc471cc5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjedp
bugs1034229
milestone33.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 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);
       }
     );
   },
 
   /**