AutoCleanupDisableBackoutStackValidation::AutoCleanupDisableBackoutStackValidation() { WRAPPER_CONTRACT; STATIC_CONTRACT_DEBUG_ONLY; m_fAlreadyDisabled = GetClrDebugState()->m_StackMarkerStack.IsDisabled(); if (!m_fAlreadyDisabled) { GetClrDebugState()->m_StackMarkerStack.RareDisableStackMarkers(); } }
WinWrapperContract(const char *szFunction, const char *szFile, int lineNum) { CANNOT_HAVE_CONTRACT; m_pClrDebugState = NULL; if (gWinWrapperContractRecursionBreak) { return; } m_pClrDebugState = GetClrDebugState(); // Save old debug state m_IncomingClrDebugState = *m_pClrDebugState; m_pClrDebugState->ViolationMaskReset( ThrowsViolation ); if (m_pClrDebugState->IsFaultForbid() && !(m_pClrDebugState->ViolationMask() & (FaultViolation|FaultNotFatal|BadDebugState))) { gWinWrapperContractRecursionBreak = TRUE; CONTRACT_ASSERT("INJECT_FAULT called in a FAULTFORBID region.", Contract::FAULT_Forbid, Contract::FAULT_Mask, szFunction, szFile, lineNum ); } };
DebugSOIntolerantTransitionHandler::DebugSOIntolerantTransitionHandler(EEThreadHandle thread) : SOIntolerantTransitionHandler(thread) { m_clrDebugState = GetClrDebugState(); if (m_clrDebugState) { m_prevSOTolerantState = m_clrDebugState->BeginSOIntolerant(); } }
// // EnsureSOTolerant ASSERTS if we are not in an SO-tolerant mode // void EnsureSOTolerant() { ClrDebugState *pClrDebugState = GetClrDebugState(); _ASSERTE(! pClrDebugState || pClrDebugState->IsSOTolerant()); }