From ef761481230d7fe68b5f823e84120e639d48ae97 Mon Sep 17 00:00:00 2001 From: Philipp von Weitershausen Date: Sun, 2 Oct 2011 01:15:46 -0700 Subject: [PATCH] Bug 690532 - syncAddDevice.js should check for JPAKE_ERROR_USERABORT. r=rnewman --- browser/base/content/syncAddDevice.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/browser/base/content/syncAddDevice.js b/browser/base/content/syncAddDevice.js index 8c109abcc6b5..036a39cf7a87 100644 --- a/browser/base/content/syncAddDevice.js +++ b/browser/base/content/syncAddDevice.js @@ -107,6 +107,9 @@ let gSyncAddDevice = { startTransfer: function startTransfer() { this.errorRow.hidden = true; + // When onAbort is called, Weave may already be gone. + const JPAKE_ERROR_USERABORT = Weave.JPAKE_ERROR_USERABORT; + let self = this; let jpakeclient = this._jpakeclient = new Weave.JPAKEClient({ onPaired: function onPaired() { @@ -124,8 +127,9 @@ let gSyncAddDevice = { delete self._jpakeclient; // Aborted by user, ignore. - if (!error) + if (error == JPAKE_ERROR_USERABORT) { return; + } self.errorRow.hidden = false; self.throbber.hidden = true;