Bug 1499316 - Follow-up: Make fetchConfigFromDisk() return Abortable() again. r=darktrojan a=jorgk
authorBen Bucksch <ben.bucksch@beonex.com>
Mon, 05 Nov 2018 11:45:00 +0100
changeset 33471 b0c69e12622b6e770a2b48cedf6808f2161d8289
parent 33470 3e08c32a7ddb2652481f584f82c275247531cb35
child 33472 3c5eda93d317847dffb2b0daee44fccb0a8f6cd3
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersdarktrojan, jorgk
bugs1499316
Bug 1499316 - Follow-up: Make fetchConfigFromDisk() return Abortable() again. r=darktrojan a=jorgk
mail/components/accountcreation/content/fetchConfig.js
--- a/mail/components/accountcreation/content/fetchConfig.js
+++ b/mail/components/accountcreation/content/fetchConfig.js
@@ -19,25 +19,26 @@ function fetchConfigFromDisk(domain, suc
     try {
       // <TB installdir>/isp/example.com.xml
       var configLocation = Services.dirsvc.get("CurProcD", Ci.nsIFile);
       configLocation.append("isp");
       configLocation.append(sanitize.hostname(domain) + ".xml");
 
       if (!configLocation.exists() || !configLocation.isReadable()) {
         errorCallback("local file not found");
-        return;
+        return new Abortable();
       }
       var contents =
         readURLasUTF8(Services.io.newFileURI(configLocation));
       let domParser = new DOMParser();
       successCallback(readFromXML(JXON.build(
         domParser.parseFromString(contents, "text/xml"))));
     } catch (e) { errorCallback(e); }
   // }));
+  return new Abortable();
 }
 
 /**
  * Tries to get a configuration from the ISP / mail provider directly.
  *
  * Disclaimers:
  * - To support domain hosters, we cannot use SSL. That means we
  *   rely on insecure DNS and http, which means the results may be