Fix contract to allow call into GarbageCollect() to throw (dotnet/coreclr#10856)
authorKoundinya Veluri <kouvel@microsoft.com>
Mon, 10 Apr 2017 20:00:48 +0000 (13:00 -0700)
committerGitHub <noreply@github.com>
Mon, 10 Apr 2017 20:00:48 +0000 (13:00 -0700)
I did not intend to mark this function as NOTHROW, and there is no reason to expect NOTHROW here. Other functions that call into GarbageCollect() allow THROWS.

Commit migrated from https://github.com/dotnet/coreclr/commit/ee4ed1ac502f037e9894006ecc8da63f97325694

src/coreclr/src/vm/threads.cpp

index 50e95e4..9af5aa4 100644 (file)
@@ -6077,7 +6077,7 @@ bool ThreadStore::ShouldTriggerGCForDeadThreads()
 void ThreadStore::TriggerGCForDeadThreadsIfNecessary()
 {
     CONTRACTL {
-        NOTHROW;
+        THROWS;
         GC_TRIGGERS;
     }
     CONTRACTL_END;