mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
bug 364731 - Windows x64 porting of bug 349002 - Refactor xptcall into a frozen API. r=benjamin, sr=dougt
This commit is contained in:
parent
7de994ed99
commit
7bce6cad34
@ -82,8 +82,8 @@ XPTC__InvokebyIndex(nsISupports* that, PRUint32 methodIndex,
|
|||||||
PRUint32 paramCount, nsXPTCVariant* params);
|
PRUint32 paramCount, nsXPTCVariant* params);
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
XPTC_PUBLIC_API(nsresult)
|
EXPORT_XPCOM_API(nsresult)
|
||||||
XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||||
PRUint32 paramCount, nsXPTCVariant* params)
|
PRUint32 paramCount, nsXPTCVariant* params)
|
||||||
{
|
{
|
||||||
return XPTC__InvokebyIndex(that, methodIndex, paramCount, params);
|
return XPTC__InvokebyIndex(that, methodIndex, paramCount, params);
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
/* Implement shared vtbl methods. */
|
/* Implement shared vtbl methods. */
|
||||||
|
|
||||||
#include "xptcprivate.h"
|
#include "xptcprivate.h"
|
||||||
|
#include "xptiprivate.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is for Windows XP 64-Bit Edition / Server 2003 for AMD64 or later.
|
* This is for Windows XP 64-Bit Edition / Server 2003 for AMD64 or later.
|
||||||
@ -56,19 +57,15 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint64* args,
|
|||||||
|
|
||||||
nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
|
nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
|
||||||
nsXPTCMiniVariant* dispatchParams = NULL;
|
nsXPTCMiniVariant* dispatchParams = NULL;
|
||||||
nsIInterfaceInfo* iface_info = NULL;
|
const nsXPTMethodInfo* info = NULL;
|
||||||
const nsXPTMethodInfo* info;
|
|
||||||
PRUint8 paramCount;
|
PRUint8 paramCount;
|
||||||
PRUint8 i;
|
PRUint8 i;
|
||||||
nsresult result = NS_ERROR_FAILURE;
|
nsresult result = NS_ERROR_FAILURE;
|
||||||
|
|
||||||
NS_ASSERTION(self,"no self");
|
NS_ASSERTION(self,"no self");
|
||||||
|
|
||||||
self->GetInterfaceInfo(&iface_info);
|
self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
|
||||||
NS_ASSERTION(iface_info,"no interface info");
|
NS_ASSERTION(info,"no method info");
|
||||||
|
|
||||||
iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
|
|
||||||
NS_ASSERTION(info,"no interface info");
|
|
||||||
|
|
||||||
paramCount = info->GetParamCount();
|
paramCount = info->GetParamCount();
|
||||||
|
|
||||||
@ -201,9 +198,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint64* args,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
|
result = self->mOuter->CallMethod((PRUint16)methodIndex, info, dispatchParams);
|
||||||
|
|
||||||
NS_RELEASE(iface_info);
|
|
||||||
|
|
||||||
if(dispatchParams != paramBuffer)
|
if(dispatchParams != paramBuffer)
|
||||||
delete [] dispatchParams;
|
delete [] dispatchParams;
|
||||||
|
Loading…
Reference in New Issue
Block a user