summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Baladurin <k.baladurin@partner.samsung.com>2018-01-12 11:46:48 +0300
committerJan Kotas <jkotas@microsoft.com>2018-01-12 12:40:37 -0800
commitf2e52524fe421ac050b8a693438f662b40214074 (patch)
tree3139b552793066d4340dd4dfd05b1fa7d196d458
parentb0a10f69a85404bcc9c377c80dc2950f927f8731 (diff)
downloadcoreclr-f2e52524fe421ac050b8a693438f662b40214074.tar.gz
coreclr-f2e52524fe421ac050b8a693438f662b40214074.tar.bz2
coreclr-f2e52524fe421ac050b8a693438f662b40214074.zip
dllimportcallback: remove code for CallbackOnCollectedDelegate MDA
-rw-r--r--src/vm/dllimportcallback.cpp71
-rw-r--r--src/vm/dllimportcallback.h19
2 files changed, 0 insertions, 90 deletions
diff --git a/src/vm/dllimportcallback.cpp b/src/vm/dllimportcallback.cpp
index fe03f47388..8623d46be3 100644
--- a/src/vm/dllimportcallback.cpp
+++ b/src/vm/dllimportcallback.cpp
@@ -112,34 +112,6 @@ EXTERN_C void STDCALL UM2MThunk_WrapperHelper(void *pThunkArgs,
UMEntryThunk *pEntryThunk,
Thread *pThread);
-#ifdef MDA_SUPPORTED
-EXTERN_C void __fastcall CallbackOnCollectedDelegateHelper(UMEntryThunk *pEntryThunk)
-{
- CONTRACTL
- {
- THROWS;
- GC_TRIGGERS;
- MODE_COOPERATIVE;
- SO_TOLERANT;
- PRECONDITION(CheckPointer(pEntryThunk));
- }
- CONTRACTL_END;
-
- MdaCallbackOnCollectedDelegate* pProbe = MDA_GET_ASSISTANT(CallbackOnCollectedDelegate);
-
- // This MDA must be active if we generated a call to CallbackOnCollectedDelegateHelper
- _ASSERTE(pProbe);
-
- if (pEntryThunk->IsCollected())
- {
- INSTALL_UNWIND_AND_CONTINUE_HANDLER;
- pProbe->ReportViolation(pEntryThunk->GetMethod());
- COMPlusThrow(kNullReferenceException);
- UNINSTALL_UNWIND_AND_CONTINUE_HANDLER;
- }
-}
-#endif // MDA_SUPPORTED
-
// This is used as target of callback from DoADCallBack. It sets up the environment and effectively
// calls back into the thunk that needed to switch ADs.
void UM2MThunk_Wrapper(LPVOID ptr) // UM2MThunk_Args
@@ -412,25 +384,6 @@ VOID UMEntryThunk::CompileUMThunkWorker(UMThunkStubInfo *pInfo,
// would deadlock).
pcpusl->EmitLabel(pDoADCallBackStartLabel);
-
-#ifdef MDA_SUPPORTED
- if ((pInfo->m_wFlags & umtmlSkipStub) && !(pInfo->m_wFlags & umtmlIsStatic) &&
- MDA_GET_ASSISTANT(CallbackOnCollectedDelegate))
- {
- // save registers
- pcpusl->X86EmitPushReg(kEAXentryThunk);
- pcpusl->X86EmitPushReg(kECXthread);
-
- // CallbackOnCollectedDelegateHelper is a fast call
- pcpusl->X86EmitMovRegReg(kECX, kEAXentryThunk);
- pcpusl->X86EmitCall(pcpusl->NewExternalCodeLabel((LPVOID)CallbackOnCollectedDelegateHelper), 0);
-
- // restore registers
- pcpusl->X86EmitPopReg(kECXthread);
- pcpusl->X86EmitPopReg(kEAXentryThunk);
- }
-#endif
-
// save the thread pointer
pcpusl->X86EmitPushReg(kECXthread);
@@ -1217,30 +1170,6 @@ VOID UMEntryThunk::FreeUMEntryThunk(UMEntryThunk* p)
}
CONTRACTL_END;
-#ifdef MDA_SUPPORTED
- MdaCallbackOnCollectedDelegate* pProbe = MDA_GET_ASSISTANT(CallbackOnCollectedDelegate);
- if (pProbe)
- {
- if (p->GetObjectHandle())
- {
- DestroyLongWeakHandle(p->GetObjectHandle());
- p->m_pObjectHandle = NULL;
-
- // We are intentionally not reseting m_pManagedTarget here so that
- // it is available for diagnostics of call on collected delegate crashes.
- }
- else
- {
- p->m_pManagedTarget = NULL;
- }
-
- // Add this to the array of delegates to be cleaned up.
- pProbe->AddToList(p);
-
- return;
- }
-#endif
-
p->Terminate();
}
diff --git a/src/vm/dllimportcallback.h b/src/vm/dllimportcallback.h
index d820a766bf..555b737fa5 100644
--- a/src/vm/dllimportcallback.h
+++ b/src/vm/dllimportcallback.h
@@ -424,13 +424,7 @@ public:
MODE_ANY;
SUPPORTS_DAC;
PRECONDITION(m_state == kRunTimeInited || m_state == kLoadTimeInited);
-#ifdef MDA_SUPPORTED
- // We can return NULL here if the CollectedDelegate probe is on because
- // a collected delegate will have set this field to NULL.
- POSTCONDITION(g_pDebugInterface->ThisIsHelperThread() || MDA_GET_ASSISTANT(CallbackOnCollectedDelegate) || CheckPointer(RETVAL));
-#else
POSTCONDITION(CheckPointer(RETVAL));
-#endif
}
CONTRACT_END;
@@ -503,15 +497,6 @@ public:
static UMEntryThunk* Decode(LPVOID pCallback);
-#ifdef MDA_SUPPORTED
- BOOL IsCollected() const
- {
- LIMITED_METHOD_CONTRACT;
- _ASSERTE(m_pMD != NULL && m_pMD->IsEEImpl());
- return m_pObjectHandle == NULL;
- }
-#endif
-
static VOID __fastcall ReportViolation(UMEntryThunk* p);
private:
@@ -613,8 +598,4 @@ EXTERN_C void UMThunkStub(void);
void STDCALL LogUMTransition(UMEntryThunk* thunk);
#endif
-#ifdef MDA_SUPPORTED
-EXTERN_C void __fastcall CallbackOnCollectedDelegateHelper(UMEntryThunk *pEntryThunk);
-#endif // MDA_SUPPORTED
-
#endif //__dllimportcallback_h__