proxy-fixup.patch
author Benjamin Smedberg <benjamin@smedbergs.us>
Sat, 26 Jul 2008 22:49:39 -0400
changeset 167 a4da40849f5436e629c5732f4368c6c48189637f
parent 10 5060b04f8cc7c767851fd65f537a71406fbb1537
permissions -rw-r--r--
State as of now

diff --git a/xpcom/proxy/src/nsProxyObjectManager.cpp b/xpcom/proxy/src/nsProxyObjectManager.cpp
--- a/xpcom/proxy/src/nsProxyObjectManager.cpp
+++ b/xpcom/proxy/src/nsProxyObjectManager.cpp
@@ -189,9 +189,7 @@ nsProxyObjectManager::GetProxyForObject(
         realObj = po->GetRealObject();
     }
 
-    nsCOMPtr<nsISupports> realEQ = do_QueryInterface(aTarget);
-
-    nsProxyEventKey rootKey(realObj, realEQ, proxyType);
+    nsProxyEventKey rootKey(realObj, aTarget, proxyType);
 
     {
         nsAutoLock lock(mProxyCreationLock);
@@ -225,9 +223,7 @@ void
 void
 nsProxyObjectManager::LockedRemove(nsProxyObject *aProxy)
 {
-    nsCOMPtr<nsISupports> realEQ = do_QueryInterface(aProxy->GetTarget());
-
-    nsProxyEventKey rootKey(aProxy->GetRealObject(), realEQ, aProxy->GetProxyType());
+    nsProxyEventKey rootKey(aProxy->GetRealObject(), aProxy->GetTarget(), aProxy->GetProxyType());
 
     if (!mProxyObjectMap.Remove(&rootKey)) {
         NS_ERROR("nsProxyObject not found in global hash.");