bug 364731 - Windows x64 porting of bug 349002 - Refactor xptcall into a frozen API. r=benjamin, sr=dougt

This commit is contained in:
m_kato%ga2.so-net.ne.jp 2007-01-03 08:30:34 +00:00
parent 7de994ed99
commit 7bce6cad34
2 changed files with 7 additions and 12 deletions

View File

@ -82,8 +82,8 @@ XPTC__InvokebyIndex(nsISupports* that, PRUint32 methodIndex,
PRUint32 paramCount, nsXPTCVariant* params);
extern "C"
XPTC_PUBLIC_API(nsresult)
XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
EXPORT_XPCOM_API(nsresult)
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
PRUint32 paramCount, nsXPTCVariant* params)
{
return XPTC__InvokebyIndex(that, methodIndex, paramCount, params);

View File

@ -38,6 +38,7 @@
/* Implement shared vtbl methods. */
#include "xptcprivate.h"
#include "xptiprivate.h"
/*
* 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* dispatchParams = NULL;
nsIInterfaceInfo* iface_info = NULL;
const nsXPTMethodInfo* info;
const nsXPTMethodInfo* info = NULL;
PRUint8 paramCount;
PRUint8 i;
nsresult result = NS_ERROR_FAILURE;
NS_ASSERTION(self,"no self");
self->GetInterfaceInfo(&iface_info);
NS_ASSERTION(iface_info,"no interface info");
iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
NS_ASSERTION(info,"no interface info");
self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
NS_ASSERTION(info,"no method info");
paramCount = info->GetParamCount();
@ -201,9 +198,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint64* args,
}
}
result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
NS_RELEASE(iface_info);
result = self->mOuter->CallMethod((PRUint16)methodIndex, info, dispatchParams);
if(dispatchParams != paramBuffer)
delete [] dispatchParams;