Bug 411301 Fix the build for s390/s390x Update the xptcall code to use the new API from 349002 r=bsmedberg a=schrep

This commit is contained in:
caillon@redhat.com 2008-01-19 13:09:25 -08:00
parent 8c8f913100
commit 519b416ae5
4 changed files with 18 additions and 26 deletions

View File

@ -200,9 +200,9 @@ invoke_copy_to_stack(PRUint32 paramCount, nsXPTCVariant* s, PRUint32* d_ov, PRUi
}
}
XPTC_PUBLIC_API(nsresult)
XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
PRUint32 paramCount, nsXPTCVariant* params)
EXPORT_XPCOM_API(nsresult)
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
PRUint32 paramCount, nsXPTCVariant* params)
{
PRUint32 *vtable = *(PRUint32 **)that;
#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
@ -251,4 +251,5 @@ XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
);
return result;
}
}

View File

@ -194,9 +194,9 @@ invoke_copy_to_stack(PRUint32 paramCount, nsXPTCVariant* s, PRUint64* d_ov, PRUi
}
}
XPTC_PUBLIC_API(nsresult)
XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
PRUint32 paramCount, nsXPTCVariant* params)
EXPORT_XPCOM_API(nsresult)
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
PRUint32 paramCount, nsXPTCVariant* params)
{
PRUint64 *vtable = *(PRUint64 **)that;
#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
@ -248,4 +248,5 @@ XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
);
return result;
}
}

View File

@ -39,6 +39,7 @@
/* Implement shared vtbl methods. */
#include "xptcprivate.h"
#include "xptiprivate.h"
static nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex,
@ -48,7 +49,6 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex,
nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
nsXPTCMiniVariant* dispatchParams = NULL;
nsIInterfaceInfo* iface_info = NULL;
const nsXPTMethodInfo* info;
PRUint8 paramCount;
PRUint8 i;
@ -56,11 +56,8 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex,
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 info");
paramCount = info->GetParamCount();
@ -174,9 +171,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex,
}
}
result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
NS_RELEASE(iface_info);
result = self->mOuter->CallMethod((PRUint16)methodIndex, info, dispatchParams);
if(dispatchParams != paramBuffer)
delete [] dispatchParams;

View File

@ -39,6 +39,7 @@
/* Implement shared vtbl methods. */
#include "xptcprivate.h"
#include "xptiprivate.h"
static nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex,
@ -48,7 +49,6 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex,
nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
nsXPTCMiniVariant* dispatchParams = NULL;
nsIInterfaceInfo* iface_info = NULL;
const nsXPTMethodInfo* info;
PRUint8 paramCount;
PRUint8 i;
@ -56,11 +56,8 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex,
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 info");
paramCount = info->GetParamCount();
@ -174,9 +171,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex,
}
}
result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
NS_RELEASE(iface_info);
result = self->mOuter->CallMethod((PRUint16)methodIndex, info, dispatchParams);
if(dispatchParams != paramBuffer)
delete [] dispatchParams;