Fix more contract violations
authornoahfalk <noahfalk@microsoft.com>
Fri, 18 Aug 2017 00:39:49 +0000 (17:39 -0700)
committernoahfalk <noahfalk@microsoft.com>
Fri, 18 Aug 2017 00:39:49 +0000 (17:39 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/4a5384a805a2c84ce4c1111d10a03fe308d3ecea

src/coreclr/src/vm/ceemain.cpp
src/coreclr/src/vm/tieredcompilation.cpp

index a9cbc8f..ff0942a 100644 (file)
@@ -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;
index 6bfd574..ea69bbf 100644 (file)
@@ -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