Bug 485347 - Update xptcall for ipf32, r=bsmedberg

This commit is contained in:
The Written Word 2009-04-13 11:19:55 -04:00
parent 46de1dbb9a
commit 27bd377e6b
2 changed files with 11 additions and 14 deletions

View File

@ -7,8 +7,8 @@
.psr msb
// Section has executable code
.section .text, "ax","progbits"
// procedure named 'XPTC_InvokeByIndex'
.proc XPTC_InvokeByIndex
// procedure named 'NS_InvokeByIndex_P'
.proc NS_InvokeByIndex_P
// manual bundling
.explicit
@ -19,12 +19,12 @@
// .exclass invoke_copy_to_stack, @fullyvisible
.type invoke_copy_to_stack,@function
// .exclass XPTC_InvokeByIndex, @fullyvisible
.type XPTC_InvokeByIndex,@function
// .exclass NS_InvokeByIndex_P, @fullyvisible
.type NS_InvokeByIndex_P,@function
// XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
// NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
// PRUint32 paramCount, nsXPTCVariant* params);
XPTC_InvokeByIndex::
NS_InvokeByIndex_P::
.prologue
.save ar.pfs, r37
// allocate 4 input args, 6 local args, and 8 output args

View File

@ -39,6 +39,7 @@
#include "xptcprivate.h"
#include "xptiprivate.h"
#include <stddef.h>
#include <stdlib.h>
@ -56,7 +57,6 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex,
nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
nsXPTCMiniVariant* dispatchParams = NULL;
nsIInterfaceInfo* iface_info = NULL;
const nsXPTMethodInfo* info;
nsresult result = NS_ERROR_FAILURE;
uint64_t* iargs = intargs;
@ -66,10 +66,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex,
NS_ASSERTION(self,"no self");
self->GetInterfaceInfo(&iface_info);
NS_ASSERTION(iface_info,"no interface info");
iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
NS_ASSERTION(info,"no interface info");
paramCount = info->GetParamCount();
@ -80,6 +77,8 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex,
else
dispatchParams = paramBuffer;
NS_ASSERTION(dispatchParams,"no place for params");
if (! dispatchParams)
return NS_ERROR_OUT_OF_MEMORY;
for(i = 0; i < paramCount; ++i)
{
@ -151,9 +150,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 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;