Bug 368482 - Alpha Linux updates from xptcall changes, patch by falk@debian.org, r=me

This commit is contained in:
benjamin%smedbergs.us 2007-01-30 21:44:30 +00:00
Родитель fb8340dc43
Коммит c2bf790675
2 изменённых файлов: 12 добавлений и 18 удалений

Просмотреть файл

@ -93,21 +93,21 @@ invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s)
}
/*
* 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)
*/
__asm__(
"#### XPTC_InvokeByIndex ####\n"
"#### NS_InvokeByIndex ####\n"
".text\n\t"
".align 5\n\t"
".globl XPTC_InvokeByIndex\n\t"
".ent XPTC_InvokeByIndex\n"
"XPTC_InvokeByIndex:\n\t"
".globl NS_InvokeByIndex\n\t"
".ent NS_InvokeByIndex\n"
"NS_InvokeByIndex:\n\t"
".frame $15,32,$26,0\n\t"
".mask 0x4008000,-32\n\t"
"ldgp $29,0($27)\n"
"$XPTC_InvokeByIndex..ng:\n\t"
"$NS_InvokeByIndex..ng:\n\t"
"subq $30,32,$30\n\t"
"stq $26,0($30)\n\t"
"stq $15,8($30)\n\t"
@ -177,5 +177,5 @@ __asm__(
"ldq $15,8($30)\n\t"
"addq $30,32,$30\n\t"
"ret $31,($26),1\n\t"
".end XPTC_InvokeByIndex"
".end NS_InvokeByIndex"
);

Просмотреть файл

@ -39,6 +39,7 @@
/* Implement shared vtbl methods. */
#include "xptcprivate.h"
#include "xptiprivate.h"
/* Prototype specifies unmangled function name and disables unused warning */
static nsresult
@ -53,7 +54,6 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args)
nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
nsXPTCMiniVariant* dispatchParams = NULL;
nsIInterfaceInfo* iface_info = NULL;
const nsXPTMethodInfo* info;
PRUint8 paramCount;
PRUint8 i;
@ -61,11 +61,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args)
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);
paramCount = info->GetParamCount();
@ -125,9 +121,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 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;