File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff 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 );
You can’t perform that action at this time.
0 commit comments