@@ -111,34 +111,6 @@ EXTERN_C void STDCALL UM2MThunk_WrapperHelper(void *pThunkArgs,
111
111
UMEntryThunk *pEntryThunk,
112
112
Thread *pThread);
113
113
114
- #ifdef MDA_SUPPORTED
115
- EXTERN_C void __fastcall CallbackOnCollectedDelegateHelper (UMEntryThunk *pEntryThunk)
116
- {
117
- CONTRACTL
118
- {
119
- THROWS;
120
- GC_TRIGGERS;
121
- MODE_COOPERATIVE;
122
- SO_TOLERANT;
123
- PRECONDITION (CheckPointer (pEntryThunk));
124
- }
125
- CONTRACTL_END;
126
-
127
- MdaCallbackOnCollectedDelegate* pProbe = MDA_GET_ASSISTANT (CallbackOnCollectedDelegate);
128
-
129
- // This MDA must be active if we generated a call to CallbackOnCollectedDelegateHelper
130
- _ASSERTE (pProbe);
131
-
132
- if (pEntryThunk->IsCollected ())
133
- {
134
- INSTALL_UNWIND_AND_CONTINUE_HANDLER;
135
- pProbe->ReportViolation (pEntryThunk->GetMethod ());
136
- COMPlusThrow (kNullReferenceException );
137
- UNINSTALL_UNWIND_AND_CONTINUE_HANDLER;
138
- }
139
- }
140
- #endif // MDA_SUPPORTED
141
-
142
114
// This is used as target of callback from DoADCallBack. It sets up the environment and effectively
143
115
// calls back into the thunk that needed to switch ADs.
144
116
void UM2MThunk_Wrapper (LPVOID ptr) // UM2MThunk_Args
@@ -411,25 +383,6 @@ VOID UMEntryThunk::CompileUMThunkWorker(UMThunkStubInfo *pInfo,
411
383
// would deadlock).
412
384
pcpusl->EmitLabel (pDoADCallBackStartLabel);
413
385
414
-
415
- #ifdef MDA_SUPPORTED
416
- if ((pInfo->m_wFlags & umtmlSkipStub) && !(pInfo->m_wFlags & umtmlIsStatic) &&
417
- MDA_GET_ASSISTANT (CallbackOnCollectedDelegate))
418
- {
419
- // save registers
420
- pcpusl->X86EmitPushReg (kEAXentryThunk );
421
- pcpusl->X86EmitPushReg (kECXthread );
422
-
423
- // CallbackOnCollectedDelegateHelper is a fast call
424
- pcpusl->X86EmitMovRegReg (kECX , kEAXentryThunk );
425
- pcpusl->X86EmitCall (pcpusl->NewExternalCodeLabel ((LPVOID)CallbackOnCollectedDelegateHelper), 0 );
426
-
427
- // restore registers
428
- pcpusl->X86EmitPopReg (kECXthread );
429
- pcpusl->X86EmitPopReg (kEAXentryThunk );
430
- }
431
- #endif
432
-
433
386
// save the thread pointer
434
387
pcpusl->X86EmitPushReg (kECXthread );
435
388
@@ -1216,30 +1169,6 @@ VOID UMEntryThunk::FreeUMEntryThunk(UMEntryThunk* p)
1216
1169
}
1217
1170
CONTRACTL_END;
1218
1171
1219
- #ifdef MDA_SUPPORTED
1220
- MdaCallbackOnCollectedDelegate* pProbe = MDA_GET_ASSISTANT (CallbackOnCollectedDelegate);
1221
- if (pProbe)
1222
- {
1223
- if (p->GetObjectHandle ())
1224
- {
1225
- DestroyLongWeakHandle (p->GetObjectHandle ());
1226
- p->m_pObjectHandle = NULL ;
1227
-
1228
- // We are intentionally not reseting m_pManagedTarget here so that
1229
- // it is available for diagnostics of call on collected delegate crashes.
1230
- }
1231
- else
1232
- {
1233
- p->m_pManagedTarget = NULL ;
1234
- }
1235
-
1236
- // Add this to the array of delegates to be cleaned up.
1237
- pProbe->AddToList (p);
1238
-
1239
- return ;
1240
- }
1241
- #endif
1242
-
1243
1172
p->Terminate ();
1244
1173
}
1245
1174
0 commit comments