Skip to content

Commit fa9dc99

Browse files
committed
Merge in 'release/6.0' changes
2 parents e3e7521 + 6c9b451 commit fa9dc99

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/coreclr/vm/syncblk.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,11 @@ class InteropSyncBlockInfo
621621
{
622622
LIMITED_METHOD_CONTRACT;
623623
ZeroMemory(this, sizeof(InteropSyncBlockInfo));
624+
625+
#if defined(FEATURE_COMWRAPPERS)
626+
// The GC thread does enumerate these objects so add CRST_UNSAFE_COOPGC.
627+
m_managedObjectComWrapperLock.Init(CrstManagedObjectWrapperMap, CRST_UNSAFE_COOPGC);
628+
#endif // FEATURE_COMWRAPPERS
624629
}
625630
#ifndef DACCESS_COMPILE
626631
~InteropSyncBlockInfo();
@@ -799,8 +804,6 @@ class InteropSyncBlockInfo
799804
if (FastInterlockCompareExchangePointer((ManagedObjectComWrapperByIdMap**)&m_managedObjectComWrapperMap, (ManagedObjectComWrapperByIdMap *)map, NULL) == NULL)
800805
{
801806
map.SuppressRelease();
802-
// The GC thread does enumerate these objects so add CRST_UNSAFE_COOPGC.
803-
m_managedObjectComWrapperLock.Init(CrstManagedObjectWrapperMap, CRST_UNSAFE_COOPGC);
804807
}
805808

806809
_ASSERTE(m_managedObjectComWrapperMap != NULL);

0 commit comments

Comments
 (0)