From 4a5384a805a2c84ce4c1111d10a03fe308d3ecea Mon Sep 17 00:00:00 2001 From: noahfalk Date: Thu, 17 Aug 2017 17:39:49 -0700 Subject: [PATCH] Fix more contract violations --- src/vm/ceemain.cpp | 5 ++++- src/vm/tieredcompilation.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/vm/ceemain.cpp b/src/vm/ceemain.cpp index a9cbc8f..ff0942a 100644 --- a/src/vm/ceemain.cpp +++ b/src/vm/ceemain.cpp @@ -1624,7 +1624,10 @@ void STDMETHODCALLTYPE EEShutDownHelper(BOOL fIsDllUnloading) g_fEEShutDown |= ShutDown_Start; #ifdef FEATURE_TIERED_COMPILATION - TieredCompilationManager::ShutdownAllDomains(); + { + GCX_PREEMP(); + TieredCompilationManager::ShutdownAllDomains(); + } #endif fFinalizeOK = TRUE; diff --git a/src/vm/tieredcompilation.cpp b/src/vm/tieredcompilation.cpp index 6bfd574..ea69bbf 100644 --- a/src/vm/tieredcompilation.cpp +++ b/src/vm/tieredcompilation.cpp @@ -110,7 +110,7 @@ void TieredCompilationManager::Init(ADID appDomainId) SpinLockHolder holder(&m_lock); m_domainId = appDomainId; - m_asyncWorkDoneEvent.CreateManualEvent(TRUE); + m_asyncWorkDoneEvent.CreateManualEventNoThrow(TRUE); } // Called each time code in this AppDomain has been run. This is our sole entrypoint to begin -- 2.7.4