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;