зеркало из https://github.com/mozilla/pjs.git
Fix for bug 304374 (|nsCOMPtr<nsIInterfaceInfoManager> iim = XPTI_GetInterfaceInfoManager()| leaks). r/sr=jst.
This commit is contained in:
Родитель
ef5b2de614
Коммит
30153febff
|
@ -143,7 +143,8 @@ nsXTFInterfaceAggregator::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
|||
NS_IMETHODIMP
|
||||
nsXTFInterfaceAggregator::GetInterfaceInfo(nsIInterfaceInfo** info)
|
||||
{
|
||||
nsCOMPtr<nsIInterfaceInfoManager> iim = XPTI_GetInterfaceInfoManager();
|
||||
nsCOMPtr<nsIInterfaceInfoManager> iim =
|
||||
getter_AddRefs(XPTI_GetInterfaceInfoManager());
|
||||
NS_ASSERTION(iim, "could not get interface info manager");
|
||||
return iim->GetInfoForIID( &mIID, info);
|
||||
}
|
||||
|
|
|
@ -137,7 +137,8 @@ nsXTFWeakTearoff::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
|||
NS_IMETHODIMP
|
||||
nsXTFWeakTearoff::GetInterfaceInfo(nsIInterfaceInfo** info)
|
||||
{
|
||||
nsCOMPtr<nsIInterfaceInfoManager> iim = XPTI_GetInterfaceInfoManager();
|
||||
nsCOMPtr<nsIInterfaceInfoManager> iim =
|
||||
getter_AddRefs(XPTI_GetInterfaceInfoManager());
|
||||
NS_ASSERTION(iim, "could not get interface info manager");
|
||||
return iim->GetInfoForIID( &mIID, info);
|
||||
}
|
||||
|
|
|
@ -108,7 +108,8 @@ CreateJavaArray(JNIEnv* env, PRUint8 aType, PRUint32 aSize, const nsID& aIID,
|
|||
case nsXPTType::T_INTERFACE:
|
||||
case nsXPTType::T_INTERFACE_IS:
|
||||
{
|
||||
nsCOMPtr<nsIInterfaceInfoManager> iim = XPTI_GetInterfaceInfoManager();
|
||||
nsCOMPtr<nsIInterfaceInfoManager> 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<nsIInterfaceInfoManager> iim = XPTI_GetInterfaceInfoManager();
|
||||
nsCOMPtr<nsIInterfaceInfoManager> iim =
|
||||
getter_AddRefs(XPTI_GetInterfaceInfoManager());
|
||||
NS_ASSERTION(iim != nsnull, "Failed to get InterfaceInfoManager");
|
||||
if (!iim)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
|
|
@ -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<nsIInterfaceInfoManager> iim = XPTI_GetInterfaceInfoManager();
|
||||
nsCOMPtr<nsIInterfaceInfoManager> iim =
|
||||
getter_AddRefs(XPTI_GetInterfaceInfoManager());
|
||||
nsCOMPtr<nsIInterfaceInfo> iinfo;
|
||||
rv = iim->GetInfoForIID(&aIID, getter_AddRefs(iinfo));
|
||||
if (NS_FAILED(rv))
|
||||
|
|
|
@ -289,7 +289,8 @@ nsJavaXPTCStub::QueryInterface(const nsID &aIID, void **aInstancePtr)
|
|||
return NS_NOINTERFACE;
|
||||
|
||||
// Get interface info for new java object
|
||||
nsCOMPtr<nsIInterfaceInfoManager> iim = XPTI_GetInterfaceInfoManager();
|
||||
nsCOMPtr<nsIInterfaceInfoManager> iim =
|
||||
getter_AddRefs(XPTI_GetInterfaceInfoManager());
|
||||
nsCOMPtr<nsIInterfaceInfo> 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<nsIInterfaceInfoManager> iim = XPTI_GetInterfaceInfoManager();
|
||||
nsCOMPtr<nsIInterfaceInfoManager> 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<nsIInterfaceInfoManager> iim = XPTI_GetInterfaceInfoManager();
|
||||
nsCOMPtr<nsIInterfaceInfoManager> iim =
|
||||
getter_AddRefs(XPTI_GetInterfaceInfoManager());
|
||||
rv = iim->GetNameForIID(&iid, &iface_name);
|
||||
if (NS_FAILED(rv) || !iface_name)
|
||||
break;
|
||||
|
|
|
@ -119,7 +119,8 @@ public:
|
|||
// a non-scriptable interface, output |nsISupports| instead of the
|
||||
// interface name.
|
||||
nsCOMPtr<nsIInterfaceInfo> info;
|
||||
nsCOMPtr<nsIInterfaceInfoManager> iim = XPTI_GetInterfaceInfoManager();
|
||||
nsCOMPtr<nsIInterfaceInfoManager> 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<nsIInterfaceInfoManager> iim = XPTI_GetInterfaceInfoManager();
|
||||
nsCOMPtr<nsIInterfaceInfoManager> iim =
|
||||
getter_AddRefs(XPTI_GetInterfaceInfoManager());
|
||||
NS_ASSERTION(iim, "could not get interface info manager");
|
||||
nsCOMPtr<nsIEnumerator> etor;
|
||||
rv = iim->EnumerateInterfaces(getter_AddRefs(etor));
|
||||
|
|
Загрузка…
Ссылка в новой задаче