Bug 524256 Allow the compiler to generate the prologue/epilogue to NS_InvokeByIndex so that it can tell the debugger that it's not omitting frame pointers r=bsmedberg

This commit is contained in:
Neil Rashbrook 2009-11-04 21:36:04 +00:00
parent 7849cfdd09
commit cab2b1bb61

View File

@ -80,13 +80,11 @@ invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, nsXPTCVariant* s)
// Tell the PDB file this function has a standard frame pointer, and not to use
// a custom FPO program.
#pragma optimize( "y", off )
extern "C" NS_EXPORT __declspec(naked) nsresult NS_FROZENCALL
extern "C" NS_EXPORT nsresult NS_FROZENCALL
NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
PRUint32 paramCount, nsXPTCVariant* params)
{
__asm {
push ebp
mov ebp,esp
mov edx,paramCount // Save paramCount for later
test edx,edx // maybe we don't have any params to copy
jz noparams
@ -103,8 +101,6 @@ noparams:
mov eax,methodIndex
call [edx][eax*4] // stdcall, i.e. callee cleans up stack.
mov esp,ebp
pop ebp
ret
}
}
#pragma warning(default : 4035) // restore default