File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -621,6 +621,11 @@ class InteropSyncBlockInfo
621
621
{
622
622
LIMITED_METHOD_CONTRACT;
623
623
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
624
629
}
625
630
#ifndef DACCESS_COMPILE
626
631
~InteropSyncBlockInfo ();
@@ -799,8 +804,6 @@ class InteropSyncBlockInfo
799
804
if (FastInterlockCompareExchangePointer ((ManagedObjectComWrapperByIdMap**)&m_managedObjectComWrapperMap, (ManagedObjectComWrapperByIdMap *)map, NULL ) == NULL )
800
805
{
801
806
map.SuppressRelease ();
802
- // The GC thread does enumerate these objects so add CRST_UNSAFE_COOPGC.
803
- m_managedObjectComWrapperLock.Init (CrstManagedObjectWrapperMap, CRST_UNSAFE_COOPGC);
804
807
}
805
808
806
809
_ASSERTE (m_managedObjectComWrapperMap != NULL );
You can’t perform that action at this time.
0 commit comments