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
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Wed, 04 Nov 2009 21:36:04 +0000
changeset 34543 c0d760c5165c9235322fe5d2788448c3710a0d51
parent 34542 ac5673902abd48faad506ee5579f0f457c9e2df7
child 34544 a6b2decfc62b29eba5dfbfcf7cf3fe8f207728a8
push id10109
push userneil@parkwaycc.co.uk
push dateWed, 04 Nov 2009 21:36:28 +0000
treeherdermozilla-central@c0d760c5165c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs524256
milestone1.9.3a1pre
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
xpcom/reflect/xptcall/src/md/win32/xptcinvoke.cpp
--- 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