mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Convert javaxpcom from using the (now-removed) XPTI_GetInterfaceInfoManager to use do_GetService, moa=jhpedemonte, from bug 315401
Original committer: bsmedberg%covad.net Original revision: 1.36 Original date: 2005/11/10 20:09:22
This commit is contained in:
parent
eb8ce8ed59
commit
1a34f5ee8c
@ -44,6 +44,7 @@
|
|||||||
#include "nsString.h"
|
#include "nsString.h"
|
||||||
#include "nsCRT.h"
|
#include "nsCRT.h"
|
||||||
#include "prmem.h"
|
#include "prmem.h"
|
||||||
|
#include "nsServiceManagerUtils.h"
|
||||||
|
|
||||||
#define JAVAPROXY_NATIVE(func) \
|
#define JAVAPROXY_NATIVE(func) \
|
||||||
Java_org_mozilla_xpcom_internal_XPCOMJavaProxy_##func
|
Java_org_mozilla_xpcom_internal_XPCOMJavaProxy_##func
|
||||||
@ -109,9 +110,9 @@ CreateJavaArray(JNIEnv* env, PRUint8 aType, PRUint32 aSize, const nsID& aIID,
|
|||||||
case nsXPTType::T_INTERFACE:
|
case nsXPTType::T_INTERFACE:
|
||||||
case nsXPTType::T_INTERFACE_IS:
|
case nsXPTType::T_INTERFACE_IS:
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIInterfaceInfoManager> iim =
|
nsCOMPtr<nsIInterfaceInfoManager>
|
||||||
getter_AddRefs(XPTI_GetInterfaceInfoManager());
|
iim(do_GetService(NS_INTERFACEINFOMANAGER_SERVICE_CONTRACTID));
|
||||||
NS_ASSERTION(iim != nsnull, "Failed to get InterfaceInfoManager");
|
NS_ASSERTION(iim, "Failed to get InterfaceInfoManager");
|
||||||
if (!iim)
|
if (!iim)
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
@ -1618,9 +1619,9 @@ CreateJavaProxy(JNIEnv* env, nsISupports* aXPCOMObject, const nsIID& aIID,
|
|||||||
if (!aResult)
|
if (!aResult)
|
||||||
return NS_ERROR_NULL_POINTER;
|
return NS_ERROR_NULL_POINTER;
|
||||||
|
|
||||||
nsCOMPtr<nsIInterfaceInfoManager> iim =
|
nsCOMPtr<nsIInterfaceInfoManager>
|
||||||
getter_AddRefs(XPTI_GetInterfaceInfoManager());
|
iim(do_GetService(NS_INTERFACEINFOMANAGER_SERVICE_CONTRACTID));
|
||||||
NS_ASSERTION(iim != nsnull, "Failed to get InterfaceInfoManager");
|
NS_ASSERTION(iim, "Failed to get InterfaceInfoManager");
|
||||||
if (!iim)
|
if (!iim)
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
|
@ -796,8 +796,10 @@ GetNewOrUsedXPCOMObject(JNIEnv* env, jobject aJavaObject, const nsIID& aIID,
|
|||||||
// create an XPCOM stub, that can route any method calls to the class.
|
// create an XPCOM stub, that can route any method calls to the class.
|
||||||
|
|
||||||
// Get interface info for class
|
// Get interface info for class
|
||||||
nsCOMPtr<nsIInterfaceInfoManager> iim =
|
nsCOMPtr<nsIInterfaceInfoManager>
|
||||||
getter_AddRefs(XPTI_GetInterfaceInfoManager());
|
iim(do_GetService(NS_INTERFACEINFOMANAGER_SERVICE_CONTRACTID, &rv));
|
||||||
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
nsCOMPtr<nsIInterfaceInfo> iinfo;
|
nsCOMPtr<nsIInterfaceInfo> iinfo;
|
||||||
rv = iim->GetInfoForIID(&aIID, getter_AddRefs(iinfo));
|
rv = iim->GetInfoForIID(&aIID, getter_AddRefs(iinfo));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
|
Loading…
Reference in New Issue
Block a user