Bug 1105889 - Libpurple proxy preferences are broken. r=clokep
authoraleth <aleth@instantbird.org>
Wed, 03 Dec 2014 02:20:11 +0100
changeset 17160 58d30b444f8c20495dae5eb4d69c8b771898b6b4
parent 17159 3f82c17bf9af93cae3730d546bb0dddda8e5411f
child 17161 dd70a4bab768ade09c0a70fc16f59ece537df679
push id10621
push useraleth@instantbird.org
push dateWed, 03 Dec 2014 01:20:53 +0000
treeherdercomm-central@58d30b444f8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersclokep
bugs1105889
Bug 1105889 - Libpurple proxy preferences are broken. r=clokep
im/content/proxies.js
--- a/im/content/proxies.js
+++ b/im/content/proxies.js
@@ -7,16 +7,19 @@ var gProxies = {
 
   // check the environment
   // see what the global settings are
   // build a list of existing proxies
 
     var pcs = Cc["@instantbird.org/libpurple/core;1"]
               .getService(Ci.purpleICoreService);
 
+    // Ensure purpleCoreService is initialized.
+    pcs.init();
+
     var proxyInfoCtr = Components.Constructor("@instantbird.org/purple/proxyinfo;1",
                                               "purpleIProxyInfo");
     var proxyInfo;
     var account = window.arguments[0];
     if (account) {
       proxyInfo = new proxyInfoCtr();
       proxyInfo.type = Ci.purpleIProxyInfo.useGlobal;
       document.getElementById("useGlobal").proxy = proxyInfo;
@@ -158,17 +161,17 @@ var gProxies = {
         item.proxy = pcs.createProxy(type, host, port, user, pass);
     }
 
     var account = window.arguments[0];
     if (!account) {
       pcs.globalProxy = item.proxy;
       return true;
     }
-      
+
     var globalCheckbox = document.getElementById("useAsGlobalSettings");
     if (!globalCheckbox.disabled && globalCheckbox.checked) {
       pcs.globalProxy = item.proxy;
       account.proxy = document.getElementById("useGlobal").proxy;
     }
     else
       account.proxy = item.proxy;
     return true;