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