Delete Timeouts
authorJan Kotas <jkotas@microsoft.com>
Sat, 25 Apr 2020 04:46:57 +0000 (21:46 -0700)
committerJan Kotas <jkotas@microsoft.com>
Sat, 25 Apr 2020 13:52:59 +0000 (06:52 -0700)
src/coreclr/src/vm/eepolicy.cpp
src/coreclr/src/vm/eepolicy.h

index ef688f5a7a5d7d6c7c211630d09ef61e8c1277c2..76a315b86b6e81dfe9472cbd115702cf610956bb 100644 (file)
@@ -47,11 +47,9 @@ EEPolicy::EEPolicy ()
 
     int n;
     for (n = 0; n < MaxClrOperation; n++) {
-        m_Timeout[n] = INFINITE;
         m_ActionOnTimeout[n] = eNoAction;
         m_DefaultAction[n] = eNoAction;
     }
-    m_Timeout[OPR_ProcessExit] = 40000;
     m_ActionOnTimeout[OPR_ProcessExit] = eRudeExitProcess;
     m_ActionOnTimeout[OPR_ThreadAbort] = eAbortThread;
     m_ActionOnTimeout[OPR_ThreadRudeAbortInNonCriticalRegion] = eRudeAbortThread;
@@ -1064,37 +1062,3 @@ void EEPolicy::HandleExitProcessFromEscalation(EPolicyAction action, UINT exitCo
 
     HandleExitProcessHelper(todo, exitCode, SCA_ExitProcessWhenShutdownComplete);
 }
-
-void EEPolicy::HandleCodeContractFailure(LPCWSTR pMessage, LPCWSTR pCondition, LPCWSTR pInnerExceptionAsString)
-{
-    WRAPPER_NO_CONTRACT;
-
-    EEPolicy* pPolicy = GetEEPolicy();
-    // GetActionOnFailure will notify the host for us.
-    EPolicyAction action = pPolicy->GetActionOnFailure(FAIL_CodeContract);
-    Thread* pThread = GetThread();
-
-    switch(action) {
-    case eThrowException:
-        // Let managed code throw a ContractException (it's easier to pass the right parameters to the constructor).
-        break;
-    case eAbortThread:
-        pThread->UserAbort(Thread::TAR_Thread, TA_Safe, GetEEPolicy()->GetTimeout(OPR_ThreadAbort), Thread::UAC_Normal);
-        break;
-    case eRudeAbortThread:
-        pThread->UserAbort(Thread::TAR_Thread, TA_Rude, GetEEPolicy()->GetTimeout(OPR_ThreadAbort), Thread::UAC_Normal);
-        break;
-    case eExitProcess:  // Merged w/ default case
-    default:
-        _ASSERTE(action == eExitProcess);
-        // Since we have no exception object, make sure
-        // UE tracker is clean so that RetrieveManagedBucketParameters
-        // does not take any bucket details.
-#ifndef TARGET_UNIX
-        pThread->GetExceptionState()->GetUEWatsonBucketTracker()->ClearWatsonBucketDetails();
-#endif // !TARGET_UNIX
-        pPolicy->HandleFatalError(COR_E_CODECONTRACTFAILED, NULL, pMessage);
-        break;
-    }
-}
-
index ac807ad28b62d12f3cc0b87b9581049f3e3239ce..217e6c73f9ca3200f0fcc979ed36187e5e9c3d4f 100644 (file)
@@ -39,19 +39,13 @@ public:
         TA_Rude
     };
 
-    enum AppDomainUnloadTypes
-    {
-        ADU_Safe,
-        ADU_Rude
-    };
-
     EEPolicy ();
 
     DWORD GetTimeout(EClrOperation operation)
     {
         LIMITED_METHOD_CONTRACT;
         _ASSERTE(static_cast<UINT>(operation) < MaxClrOperation);
-        return m_Timeout[operation];
+        return INFINITE; // No hardcoded timeouts
     }
 
     EPolicyAction GetActionOnTimeout(EClrOperation operation, Thread *pThread)
@@ -82,10 +76,6 @@ public:
 
     static void HandleStackOverflow(StackOverflowDetector detector, void * pLimitFrame);
 
-    static void HandleSoftStackOverflow(BOOL fSkipDebugger = FALSE);
-
-    static void HandleStackOverflowAfterCatch();
-
     static void HandleExitProcess(ShutdownCompleteAction sca = SCA_ExitProcessWhenShutdownComplete);
 
     static int NOINLINE HandleFatalError(UINT exitCode, UINT_PTR address, LPCWSTR pMessage=NULL, PEXCEPTION_POINTERS pExceptionInfo= NULL, LPCWSTR errorSource=NULL, LPCWSTR argExceptionString=NULL);
@@ -94,10 +84,7 @@ public:
 
     static void HandleExitProcessFromEscalation(EPolicyAction action, UINT exitCode);
 
-    static void HandleCodeContractFailure(LPCWSTR pMessage, LPCWSTR pCondition, LPCWSTR pInnerExceptionAsString);
-
 private:
-    DWORD m_Timeout[MaxClrOperation];
     EPolicyAction m_ActionOnTimeout[MaxClrOperation];
     EPolicyAction m_DefaultAction[MaxClrOperation];
     EPolicyAction m_ActionOnFailure[MaxClrFailure];