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
--- a/xpcom/reflect/xptcall/src/md/win32/xptcinvoke.cpp
+++ b/xpcom/reflect/xptcall/src/md/win32/xptcinvoke.cpp
@@ -75,36 +75,32 @@ invoke_copy_to_stack(PRUint32* d, PRUint
}
}
}
#pragma warning(disable : 4035) // OK to have no return value
// 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
mov eax,edx
shl eax,3 // *= 8 (max possible param size)
sub esp,eax // make space for params
mov ecx,esp
push params
call invoke_copy_to_stack // fastcall, ecx = d, edx = paramCount, params is on the stack
noparams:
mov ecx,that // instance in ecx
push ecx // push this
mov edx,[ecx] // vtable in edx
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