PCODE CallCountingManager::OnCallCountThresholdReached(TransitionBlock *transitionBlock, TADDR stubIdentifyingToken)
{
- CONTRACTL
- {
- THROWS;
- GC_TRIGGERS;
- MODE_COOPERATIVE;
- PRECONDITION(CheckPointer(transitionBlock));
- }
- CONTRACTL_END;
+ STATIC_CONTRACT_THROWS;
+ STATIC_CONTRACT_GC_TRIGGERS;
+ STATIC_CONTRACT_MODE_COOPERATIVE;
+
+ PCODE codeEntryPoint;
+
+ BEGIN_PRESERVE_LAST_ERROR;
MAKE_CURRENT_THREAD_AVAILABLE();
CallCountingHelperFrame *frame = &frameWithCookie;
frame->Push(CURRENT_THREAD);
- PCODE codeEntryPoint;
-
INSTALL_MANAGED_EXCEPTION_DISPATCHER;
INSTALL_UNWIND_AND_CONTINUE_HANDLER;
UNINSTALL_MANAGED_EXCEPTION_DISPATCHER;
frame->Pop(CURRENT_THREAD);
+
+ END_PRESERVE_LAST_ERROR;
+
return codeEntryPoint;
}