From 32af48e442a960b8c3f199f5ffad28a34590fcda Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Thu, 28 Apr 2011 13:28:55 +0200 Subject: Reformatting to MoFo coding style --- lib/libbugzilla.js | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) (limited to 'lib/libbugzilla.js') diff --git a/lib/libbugzilla.js b/lib/libbugzilla.js index 7e2398b..c85d331 100644 --- a/lib/libbugzilla.js +++ b/lib/libbugzilla.js @@ -38,23 +38,26 @@ function log(msg) { } /** - * parse XML object out of string working around various bugs in Gecko implementation - * see https://developer.mozilla.org/en/E4X for more information - * - * @param inStr String with unparsed XML string + * parse XML object out of string working around various bugs in Gecko + * implementation see https://developer.mozilla.org/en/E4X for more information + * + * @param inStr + * String with unparsed XML string * @return XML object */ function parseXMLfromString (inStuff) { - // if (typeof inStuff !== 'string') In future we should recognize this.response + // if (typeof inStuff !== 'string') In future we should recognize + // this.response // and get just .text property out of it. TODO - var respStr = inStuff.replace(/^<\?xml\s+version\s*=\s*(["'])[^\1]+\1[^?]*\?>/, ""); // bug 336551 + var respStr = inStuff.replace(/^<\?xml\s+version\s*=\s*(["'])[^\1]+\1[^?]*\?>/, ""); // bug + // 336551 return new XML(respStr); } /** - * In case URL contains alias, not the real bug number, get the real bug no - * from the XML representation. Sets correct value to this.bugNo. - * + * In case URL contains alias, not the real bug number, get the real bug no from + * the XML representation. Sets correct value to this.bugNo. + * * This is a slow variant for bugs other than actual window */ function getRealBugNoSlow(bugNo, location, callback) { @@ -141,14 +144,11 @@ exports.changeJSONURL = function changeJSONURL() { }; /** - * - libbz.getInstalledPackages(msg.data, function (pkgsMsg) { - worker.postMessage(pkgsMsg); - - locationLoginObj: { - location: window.location.href, - login: getLogin() - } + * + * libbz.getInstalledPackages(msg.data, function (pkgsMsg) { + * worker.postMessage(pkgsMsg); + * + * locationLoginObj: { location: window.location.href, login: getLogin() } */ exports.getInstalledPackages = function getInstalledPackages(locationLoginObj, callback) { var installedPackages = {}; @@ -283,14 +283,16 @@ exports.createUpstreamBug = function createUpstreamBug(urlStr, subject, comment) }); }; -// Make a XML-RPC call ... most of the business logic should stay in the content script +// Make a XML-RPC call ... most of the business logic should stay in the content +// script exports.makeXMLRPCCall = function makeXMLRPCCall(url, login, method, params, callback) { var urlObj = urlMod.URL(url); getPassword(login, urlObj.schema + "://" + urlObj.host, function (passwObj) { if (!passwObj.password) { - // TODO this should happen, only when user presses Escape in password prompt + // TODO this should happen, only when user presses Escape in password + // prompt return null; } -- cgit