diff --git a/content/xtf/src/nsXTFInterfaceAggregator.cpp b/content/xtf/src/nsXTFInterfaceAggregator.cpp index c457e6eef9a..b27578006f1 100644 --- a/content/xtf/src/nsXTFInterfaceAggregator.cpp +++ b/content/xtf/src/nsXTFInterfaceAggregator.cpp @@ -143,7 +143,8 @@ nsXTFInterfaceAggregator::QueryInterface(REFNSIID aIID, void** aInstancePtr) NS_IMETHODIMP nsXTFInterfaceAggregator::GetInterfaceInfo(nsIInterfaceInfo** info) { - nsCOMPtr iim = XPTI_GetInterfaceInfoManager(); + nsCOMPtr iim = + getter_AddRefs(XPTI_GetInterfaceInfoManager()); NS_ASSERTION(iim, "could not get interface info manager"); return iim->GetInfoForIID( &mIID, info); } diff --git a/content/xtf/src/nsXTFWeakTearoff.cpp b/content/xtf/src/nsXTFWeakTearoff.cpp index 2ba54c0f279..51fb2da6bfc 100644 --- a/content/xtf/src/nsXTFWeakTearoff.cpp +++ b/content/xtf/src/nsXTFWeakTearoff.cpp @@ -137,7 +137,8 @@ nsXTFWeakTearoff::QueryInterface(REFNSIID aIID, void** aInstancePtr) NS_IMETHODIMP nsXTFWeakTearoff::GetInterfaceInfo(nsIInterfaceInfo** info) { - nsCOMPtr iim = XPTI_GetInterfaceInfoManager(); + nsCOMPtr iim = + getter_AddRefs(XPTI_GetInterfaceInfoManager()); NS_ASSERTION(iim, "could not get interface info manager"); return iim->GetInfoForIID( &mIID, info); } diff --git a/extensions/java/xpcom/nsJavaWrapper.cpp b/extensions/java/xpcom/nsJavaWrapper.cpp index 996cfb66308..18d8d09f965 100644 --- a/extensions/java/xpcom/nsJavaWrapper.cpp +++ b/extensions/java/xpcom/nsJavaWrapper.cpp @@ -108,7 +108,8 @@ CreateJavaArray(JNIEnv* env, PRUint8 aType, PRUint32 aSize, const nsID& aIID, case nsXPTType::T_INTERFACE: case nsXPTType::T_INTERFACE_IS: { - nsCOMPtr iim = XPTI_GetInterfaceInfoManager(); + nsCOMPtr iim = + getter_AddRefs(XPTI_GetInterfaceInfoManager()); NS_ASSERTION(iim != nsnull, "Failed to get InterfaceInfoManager"); if (!iim) return NS_ERROR_FAILURE; @@ -1616,7 +1617,8 @@ CreateJavaProxy(JNIEnv* env, nsISupports* aXPCOMObject, const nsIID& aIID, if (!aResult) return NS_ERROR_NULL_POINTER; - nsCOMPtr iim = XPTI_GetInterfaceInfoManager(); + nsCOMPtr iim = + getter_AddRefs(XPTI_GetInterfaceInfoManager()); NS_ASSERTION(iim != nsnull, "Failed to get InterfaceInfoManager"); if (!iim) return NS_ERROR_FAILURE; diff --git a/extensions/java/xpcom/nsJavaXPCOMBindingUtils.cpp b/extensions/java/xpcom/nsJavaXPCOMBindingUtils.cpp index e9dd786ee35..e0809902a46 100644 --- a/extensions/java/xpcom/nsJavaXPCOMBindingUtils.cpp +++ b/extensions/java/xpcom/nsJavaXPCOMBindingUtils.cpp @@ -791,7 +791,8 @@ GetNewOrUsedXPCOMObject(JNIEnv* env, jobject aJavaObject, const nsIID& aIID, // create an XPCOM stub, that can route any method calls to the class. // Get interface info for class - nsCOMPtr iim = XPTI_GetInterfaceInfoManager(); + nsCOMPtr iim = + getter_AddRefs(XPTI_GetInterfaceInfoManager()); nsCOMPtr iinfo; rv = iim->GetInfoForIID(&aIID, getter_AddRefs(iinfo)); if (NS_FAILED(rv)) diff --git a/extensions/java/xpcom/nsJavaXPTCStub.cpp b/extensions/java/xpcom/nsJavaXPTCStub.cpp index 44227412d25..c7408ed8ff5 100644 --- a/extensions/java/xpcom/nsJavaXPTCStub.cpp +++ b/extensions/java/xpcom/nsJavaXPTCStub.cpp @@ -289,7 +289,8 @@ nsJavaXPTCStub::QueryInterface(const nsID &aIID, void **aInstancePtr) return NS_NOINTERFACE; // Get interface info for new java object - nsCOMPtr iim = XPTI_GetInterfaceInfoManager(); + nsCOMPtr iim = + getter_AddRefs(XPTI_GetInterfaceInfoManager()); nsCOMPtr iinfo; nsresult rv = iim->GetInfoForIID(&aIID, getter_AddRefs(iinfo)); if (NS_FAILED(rv)) @@ -891,7 +892,8 @@ nsJavaXPTCStub::SetupJavaParams(const nsXPTParamInfo &aParamInfo, // get name of interface char* iface_name = nsnull; - nsCOMPtr iim = XPTI_GetInterfaceInfoManager(); + nsCOMPtr iim = + getter_AddRefs(XPTI_GetInterfaceInfoManager()); rv = iim->GetNameForIID(&iid, &iface_name); if (NS_FAILED(rv) || !iface_name) break; @@ -1118,7 +1120,8 @@ nsJavaXPTCStub::GetRetvalSig(const nsXPTParamInfo* aParamInfo, // get name of interface char* iface_name = nsnull; - nsCOMPtr iim = XPTI_GetInterfaceInfoManager(); + nsCOMPtr iim = + getter_AddRefs(XPTI_GetInterfaceInfoManager()); rv = iim->GetNameForIID(&iid, &iface_name); if (NS_FAILED(rv) || !iface_name) break; diff --git a/extensions/java/xpcom/tools/genifaces/GenerateJavaInterfaces.cpp b/extensions/java/xpcom/tools/genifaces/GenerateJavaInterfaces.cpp index 88d169bf9c6..b9d2cd5bbae 100644 --- a/extensions/java/xpcom/tools/genifaces/GenerateJavaInterfaces.cpp +++ b/extensions/java/xpcom/tools/genifaces/GenerateJavaInterfaces.cpp @@ -119,7 +119,8 @@ public: // a non-scriptable interface, output |nsISupports| instead of the // interface name. nsCOMPtr info; - nsCOMPtr iim = XPTI_GetInterfaceInfoManager(); + nsCOMPtr iim = + getter_AddRefs(XPTI_GetInterfaceInfoManager()); NS_ASSERTION(iim, "could not get interface info manager"); rv = iim->GetInfoForIID(iid, getter_AddRefs(info)); NS_ENSURE_SUCCESS(rv, rv); @@ -209,7 +210,8 @@ public: { nsresult rv; - nsCOMPtr iim = XPTI_GetInterfaceInfoManager(); + nsCOMPtr iim = + getter_AddRefs(XPTI_GetInterfaceInfoManager()); NS_ASSERTION(iim, "could not get interface info manager"); nsCOMPtr etor; rv = iim->EnumerateInterfaces(getter_AddRefs(etor));