diff options
Diffstat (limited to 'src/vm/eepolicy.cpp')
-rw-r--r-- | src/vm/eepolicy.cpp | 85 |
1 files changed, 1 insertions, 84 deletions
diff --git a/src/vm/eepolicy.cpp b/src/vm/eepolicy.cpp index 236f5afd6e..be5fa00ee5 100644 --- a/src/vm/eepolicy.cpp +++ b/src/vm/eepolicy.cpp @@ -70,12 +70,10 @@ EEPolicy::EEPolicy () m_ActionOnFailure[FAIL_NonCriticalResource] = eThrowException; m_ActionOnFailure[FAIL_OrphanedLock] = eNoAction; m_ActionOnFailure[FAIL_FatalRuntime] = eRudeExitProcess; -#ifdef FEATURE_CORECLR // For CoreCLR, initialize the default action for AV processing to all // all kind of code to catch AV exception. If the host wants, they can // specify a different action for this. m_ActionOnFailure[FAIL_AccessViolation] = eNoAction; -#endif // FEATURE_CORECLR m_ActionOnFailure[FAIL_StackOverflow] = eRudeExitProcess; m_ActionOnFailure[FAIL_CodeContract] = eThrowException; m_unhandledExceptionPolicy = eRuntimeDeterminedPolicy; @@ -178,22 +176,10 @@ BOOL EEPolicy::IsValidActionForFailure(EClrFailure failure, EPolicyAction action return action >= eUnloadAppDomain && action < MaxPolicyAction; case FAIL_AccessViolation: -#ifdef FEATURE_CORECLR // Allowed actions on failure are: // // eNoAction or eRudeExitProcess. return ((action == eNoAction) || (action == eRudeExitProcess)); -#else // !FEATURE_CORECLR - // FAIL_AccessViolation is defined for the desktop so that - // if any more definitions are added after it, their value - // should remain constant irrespective of whether its the - // desktop CLR or CoreCLR. - // - // That said, currently, Desktop CLR does not support - // FAIL_AccessViolation. Thus, any calls which use - // this failure are not allowed. - return FALSE; -#endif // FEATURE_CORECLR case FAIL_StackOverflow: return action >= eRudeUnloadAppDomain && action < MaxPolicyAction; @@ -424,22 +410,6 @@ EPolicyAction EEPolicy::GetActionOnFailure(EClrFailure failure) } EPolicyAction finalAction = GetActionOnFailureNoHostNotification(failure); -#ifdef FEATURE_INCLUDE_ALL_INTERFACES - IHostPolicyManager *pHostPolicyManager = CorHost2::GetHostPolicyManager(); - if (pHostPolicyManager) - { -#ifdef _DEBUG - Thread* pThread = GetThread(); - if (pThread) - { - pThread->AddFiberInfo(Thread::ThreadTrackInfo_Escalation); - } -#endif - BEGIN_SO_TOLERANT_CODE_CALLING_HOST(GetThread()); - pHostPolicyManager->OnFailure(failure, finalAction); - END_SO_TOLERANT_CODE_CALLING_HOST; - } -#endif // FEATURE_INCLUDE_ALL_INTERFACES return finalAction; } @@ -455,22 +425,6 @@ void EEPolicy::NotifyHostOnTimeout(EClrOperation operation, EPolicyAction action } CONTRACTL_END; -#ifdef FEATURE_INCLUDE_ALL_INTERFACES - IHostPolicyManager *pHostPolicyManager = CorHost2::GetHostPolicyManager(); - if (pHostPolicyManager) - { -#ifdef _DEBUG - Thread* pThread = GetThread(); - if (pThread) - { - pThread->AddFiberInfo(Thread::ThreadTrackInfo_Escalation); - } -#endif - BEGIN_SO_TOLERANT_CODE_CALLING_HOST(GetThread()); - pHostPolicyManager->OnTimeout(operation, action); - END_SO_TOLERANT_CODE_CALLING_HOST; - } -#endif // FEATURE_INCLUDE_ALL_INTERFACES } @@ -485,22 +439,6 @@ void EEPolicy::NotifyHostOnDefaultAction(EClrOperation operation, EPolicyAction } CONTRACTL_END; -#ifdef FEATURE_INCLUDE_ALL_INTERFACES - IHostPolicyManager *pHostPolicyManager = CorHost2::GetHostPolicyManager(); - if (pHostPolicyManager) - { -#ifdef _DEBUG - Thread* pThread = GetThread(); - if (pThread) - { - pThread->AddFiberInfo(Thread::ThreadTrackInfo_Escalation); - } -#endif - BEGIN_SO_TOLERANT_CODE_CALLING_HOST(GetThread()); - pHostPolicyManager->OnDefaultAction(operation, action); - END_SO_TOLERANT_CODE_CALLING_HOST; - } -#endif // FEATURE_INCLUDE_ALL_INTERFACES } void SafeExitProcess(UINT exitCode, BOOL fAbort = FALSE, ShutdownCompleteAction sca = SCA_ExitProcessWhenShutdownComplete) @@ -602,21 +540,6 @@ void EEPolicy::ExitProcessViaShim(UINT exitCode) // runtime in a process with many. We need to give the other runtimes a chance to exit // cleanly. If we can't make the call, or if the call fails for some reason, then we // simply exit the process here, which is rude to the others, but the best we can do. -#if !defined(FEATURE_CORECLR) - { - ReleaseHolder<ICLRRuntimeHostInternal> pRuntimeHostInternal; - - HRESULT hr = g_pCLRRuntime->GetInterface(CLSID_CLRRuntimeHostInternal, - IID_ICLRRuntimeHostInternal, - &pRuntimeHostInternal); - - if (SUCCEEDED(hr)) - { - pRuntimeHostInternal->ShutdownAllRuntimesThenExit(exitCode); - LOG((LF_EH, LL_INFO10, "ExitProcessViaShim: shim returned... exiting now.\n")); - } - } -#endif // !FEATURE_CORECLR ExitProcess(exitCode); } @@ -1001,13 +924,7 @@ void EEPolicy::HandleStackOverflow(StackOverflowDetector detector, void * pLimit switch (detector) { case SOD_ManagedFrameHandler: - if (!pThread->PreemptiveGCDisabled() && !fInCLR && fInSoTolerant - && - // Before we call managed code, we probe inside ReverseEnterRuntime for BACKOUT_CODE_STACK_LIMIT pages - // If we hit hard so here, we are still in our stub - (!CLRTaskHosted() || (UINT_PTR)pThread->m_pFrame - pThread->GetLastAllowableStackAddress() >= - ADJUST_PROBE(BACKOUT_CODE_STACK_LIMIT) * OS_PAGE_SIZE) - ) + if (!pThread->PreemptiveGCDisabled() && !fInCLR && fInSoTolerant) { // Managed exception handler detects SO, but the thread is in preemptive GC mode, // and the IP is outside CLR. This means we are inside a PINVOKE call. |