remove proxying of ldap message listener during smime cert fetching, r=jcranmer, part of bug 675407
authorDavid Bienvenu <bienvenu@nventure.com>
Thu, 01 Sep 2011 12:45:57 -0700
changeset 9094 ed9d5de23537f38a51532760e5ba8e29eeb12ee9
parent 9093 9dbeb66df9ab3286fd15ff043a4a31c338a3b2e9
child 9095 e6f3893aef00a950bb7f36dd83aa0403050f270f
push id230
push userbugzilla@standard8.plus.com
push dateTue, 08 Nov 2011 22:55:24 +0000
treeherdercomm-beta@63dad5648415 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjcranmer, part
bugs675407
remove proxying of ldap message listener during smime cert fetching, r=jcranmer, part of bug 675407
mailnews/extensions/smime/content/certFetchingStatus.js
--- a/mailnews/extensions/smime/content/certFetchingStatus.js
+++ b/mailnews/extensions/smime/content/certFetchingStatus.js
@@ -90,19 +90,17 @@ function search()
 
     gLdapServerURL = Components.classes["@mozilla.org/network/io-service;1"]
       .getService(Components.interfaces.nsIIOService)
       .newURI(url, null, null).QueryInterface(Components.interfaces.nsILDAPURL);
 
     gLdapConnection = Components.classes["@mozilla.org/network/ldap-connection;1"]
       .createInstance().QueryInterface(Components.interfaces.nsILDAPConnection);
 
-    gLdapConnection.init(gLdapServerURL, gLogin,
-      getProxyOnUIThread(new boundListener(),
-                         Components.interfaces.nsILDAPMessageListener),
+    gLdapConnection.init(gLdapServerURL, gLogin, new boundListener(),
       null, Components.interfaces.nsILDAPConnection.VERSION3);
 
   } catch (ex) {
     dump(ex);
     dump(" exception creating ldap connection\n");
     window.close();
   }
 }
@@ -134,18 +132,17 @@ function importCert(ber_value)
 }
 
 function getLDAPOperation()
 {
     gLdapOperation = Components.classes["@mozilla.org/network/ldap-operation;1"]
       .createInstance().QueryInterface(Components.interfaces.nsILDAPOperation);
 
     gLdapOperation.init(gLdapConnection,
-                        getProxyOnUIThread(new ldapMessageListener(),
-                            Components.interfaces.nsILDAPMessageListener),
+                        new ldapMessageListener(),
                         null);
 }
 
 function getPassword()
 {
   // we only need a password if we are using credentials
   if (gLogin)
   {
@@ -299,23 +296,8 @@ ldapMessageListener.prototype.onLDAPMess
       }
       return;
     }
   }
 
 ldapMessageListener.prototype.onLDAPInit =
   function(aConn, aStatus) {
   }
-
-
-function getProxyOnUIThread(aObject, aInterface) {
-    var mainThread = Components.
-            classes["@mozilla.org/thread-manager;1"].
-            getService().mainThread;
-
-    var proxyMgr = Components.
-            classes["@mozilla.org/xpcomproxy;1"].
-            getService(Components.interfaces.nsIProxyObjectManager);
-
-    return proxyMgr.getProxyForObject(mainThread,
-            aInterface, aObject, 5);
-    // 5 == NS_PROXY_ALWAYS | NS_PROXY_SYNC
-}