From cf99a8e8a8dfdc8dfefc6ca4452f9bde56e58b6e Mon Sep 17 00:00:00 2001 From: "reed%reedloden.com" Date: Thu, 17 Jan 2008 07:52:17 +0000 Subject: [PATCH] Bug 408808 - "nsProxiedService.h should not use NS_GetProxyForObject" [p=prasad@medhas.org (Prasad Sunkari [prasad]) r=bsmedberg sr=Neil a1.9=schrep] git-svn-id: svn://10.0.0.236/trunk@243352 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/proxy/public/nsProxiedService.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/mozilla/xpcom/proxy/public/nsProxiedService.h b/mozilla/xpcom/proxy/public/nsProxiedService.h index d3a3ca1ef46..3355f429101 100644 --- a/mozilla/xpcom/proxy/public/nsProxiedService.h +++ b/mozilla/xpcom/proxy/public/nsProxiedService.h @@ -39,8 +39,9 @@ #ifndef nsProxiedService_h__ #define nsProxiedService_h__ -#include "nsIServiceManager.h" +#include "nsServiceManagerUtils.h" #include "nsIProxyObjectManager.h" +#include "nsXPCOMCIDInternal.h" //////////////////////////////////////////////////////////////////////////////// // NS_WITH_PROXIED_SERVICE: macro to make using services that need to be proxied @@ -125,11 +126,15 @@ private: if (always) proxyType |= NS_PROXY_ALWAYS; - *rv = NS_GetProxyForObject(aTarget, - aIID, - aObj, - proxyType, - getter_AddRefs(mProxiedService)); + nsCOMPtr proxyObjMgr = do_GetService(NS_XPCOMPROXY_CONTRACTID, rv); + if (NS_FAILED(*rv)) + return; + + *rv = proxyObjMgr->GetProxyForObject(aTarget, + aIID, + aObj, + proxyType, + getter_AddRefs(mProxiedService)); } nsCOMPtr mProxiedService;