From e559cd87c5f5d3852d34e38a83cf53f8ddfadac8 Mon Sep 17 00:00:00 2001 From: "mj%digicool.com" Date: Mon, 8 May 2000 14:00:12 +0000 Subject: [PATCH] Fix potential bug in nsXmlRpcClient::call, if an exception takes place in parsing the response. --- extensions/xml-rpc/src/nsXmlRpcClient.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/extensions/xml-rpc/src/nsXmlRpcClient.js b/extensions/xml-rpc/src/nsXmlRpcClient.js index b36f10824e43..abd1f37a201c 100644 --- a/extensions/xml-rpc/src/nsXmlRpcClient.js +++ b/extensions/xml-rpc/src/nsXmlRpcClient.js @@ -18,9 +18,9 @@ /* * nsXmlRpcClient XPCOM component - * Version: $Revision: 1.2 $ + * Version: $Revision: 1.3 $ * - * $Id: nsXmlRpcClient.js,v 1.2 2000/05/08 10:38:26 mj%digicool.com Exp $ + * $Id: nsXmlRpcClient.js,v 1.3 2000/05/08 14:00:12 mj%digicool.com Exp $ */ /* @@ -163,18 +163,19 @@ nsXmlRpcClient.prototype = { debug('Parse finished'); debug('Fault? ' + this._fault); debug('Result? ' + this._result); - if (this._fault) - throw Components.Exception('XML-RPC Fault', null, null, - this._fault); - else - return this._result; } catch(ex) { this._status = ex.result; this._errorMsg = ex.message; - ctxt.listener.onError(this, ctxt.context, ex.result, ex.message); + throw ex; } finally { this._inProgress = false; } + + if (this._fault) + throw Components.Exception('XML-RPC Fault', null, null, + this._fault); + else + return this._result; }, // Internal copy of the status, so's we can throw it to the syncnronous