Bug 1499316 - Follow-up: Make fetchConfigFromDisk() return Abortable() again. r=darktrojan
authorBen Bucksch <ben.bucksch@beonex.com>
Mon, 05 Nov 2018 11:45:00 +0100
changeset 33663 0a2c3922830231ab2119d601bafe527983999d5c
parent 33662 d3c5b1d085805fd54890be3cf65a16d0c704541d
child 33664 c50ee3de6f300b2479a6f9d415ffedb749646de1
push id388
push userclokep@gmail.com
push dateMon, 28 Jan 2019 20:54:56 +0000
reviewersdarktrojan
bugs1499316
Bug 1499316 - Follow-up: Make fetchConfigFromDisk() return Abortable() again. r=darktrojan
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