diff options
author | Jan Kotas <jkotas@microsoft.com> | 2018-11-21 08:23:30 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-21 08:23:30 -0800 |
commit | c94d8e68222d931d4bb1c4eb9a52b4b056e85f12 (patch) | |
tree | 8698c9c4e26b58feee82d8e743ca9e5d89f1f2c6 /src/vm/comcallablewrapper.h | |
parent | 5e1cee78e6e7a2464deee07acfe5fe9c33925828 (diff) | |
download | coreclr-c94d8e68222d931d4bb1c4eb9a52b4b056e85f12.tar.gz coreclr-c94d8e68222d931d4bb1c4eb9a52b4b056e85f12.tar.bz2 coreclr-c94d8e68222d931d4bb1c4eb9a52b4b056e85f12.zip |
Delete dead/unused code (#21138)
Diffstat (limited to 'src/vm/comcallablewrapper.h')
-rw-r--r-- | src/vm/comcallablewrapper.h | 109 |
1 files changed, 5 insertions, 104 deletions
diff --git a/src/vm/comcallablewrapper.h b/src/vm/comcallablewrapper.h index 17ef0140a5..56ebc94a96 100644 --- a/src/vm/comcallablewrapper.h +++ b/src/vm/comcallablewrapper.h @@ -1041,9 +1041,6 @@ public: BOOL NeedToSwitchDomains(Thread *pThread); BOOL NeedToSwitchDomains(ADID appdomainID); - void MakeAgile(OBJECTREF pObj); - void CheckMakeAgile(OBJECTREF pObj); - VOID ResetHandleStrength(); VOID MarkHandleWeak(); @@ -1214,9 +1211,6 @@ public: // is the object aggregated by a COM component BOOL IsAggregated(); - // is the object a transparent proxy - BOOL IsObjectTP(); - // is the object extends from (aggregates) a COM component BOOL IsExtendsCOMObject(); @@ -1495,8 +1489,8 @@ private: enum_IsAggregated = 0x1, enum_IsExtendsCom = 0x2, enum_IsHandleWeak = 0x4, - enum_IsObjectTP = 0x8, - enum_IsAgile = 0x10, + // unused = 0x8, + // unused = 0x10, enum_IsPegged = 0x80, // unused = 0x100, enum_CustomQIRespondsToIMarshal = 0x200, @@ -1638,9 +1632,6 @@ public: MODE_ANY; } CONTRACTL_END; - - if (IsAgile()) - return GetThread()->GetDomain()->GetId(); return m_dwDomainId; } @@ -1651,82 +1642,15 @@ public: return m_dwDomainId; } -#ifndef CROSSGEN_COMPILE inline BOOL NeedToSwitchDomains(Thread *pThread, ADID *pTargetADID, Context **ppTargetContext) { - CONTRACTL - { - NOTHROW; - WRAPPER(GC_TRIGGERS); - MODE_ANY; - SUPPORTS_DAC; - } - CONTRACTL_END; - - if (IsAgile()) - return FALSE; - - if (m_dwDomainId == pThread->GetDomain()->GetId() && m_pContext == pThread->GetContext()) - return FALSE; - - // we intentionally don't provide any other way to read m_pContext so the caller always - // gets ADID & Context that are guaranteed to be in sync (note that GetDomainID() lies - // if the CCW is agile and using it together with m_pContext leads to issues) - *pTargetADID = m_dwDomainId; - *ppTargetContext = m_pContext; - - return TRUE; + LIMITED_METHOD_DAC_CONTRACT; + return FALSE; } - - // if you call this you must either pass TRUE for throwIfUnloaded or check - // after the result before accessing any pointers that may be invalid. inline BOOL NeedToSwitchDomains(ADID appdomainID) { LIMITED_METHOD_DAC_CONTRACT; - // Check for a direct domain ID match first -- this is more common than agile wrappers. - return (m_dwDomainId != appdomainID) && !IsAgile(); - } -#endif //CROSSGEN_COMPILE - - BOOL ShouldBeAgile() - { - CONTRACTL - { - WRAPPER(THROWS); - WRAPPER(GC_TRIGGERS); - MODE_ANY; - } - CONTRACTL_END; - - return (!IsAgile() && GetThread()->GetDomain()->GetId()!= m_dwDomainId); - } - - void MakeAgile(OBJECTHANDLE origHandle) - { - CONTRACTL - { - WRAPPER(THROWS); - WRAPPER(GC_TRIGGERS); - MODE_COOPERATIVE; - } - CONTRACTL_END; - - m_hOrigDomainHandle = origHandle; - FastInterlockOr((ULONG*)&m_flags, enum_IsAgile); - } - - BOOL IsAgile() - { - LIMITED_METHOD_CONTRACT; - - return m_flags & enum_IsAgile; - } - - BOOL IsObjectTP() - { - LIMITED_METHOD_CONTRACT; - - return m_flags & enum_IsObjectTP; + return FALSE; } // is the object aggregated by a COM component @@ -2218,12 +2142,6 @@ private: ComCallWrapperCache* m_pWrapperCache; PTR_ComCallWrapperTemplate m_pTemplate; - // when we make the object agile, need to save off the original handle so we can clean - // it up when the object goes away. - // <TODO>Would be nice to overload one of the other values with this, but then - // would have to synchronize on it too</TODO> - OBJECTHANDLE m_hOrigDomainHandle; - // Points to uncommonly used data that are dynamically allocated VolatilePtr<SimpleCCWAuxData> m_pAuxData; @@ -2289,8 +2207,6 @@ inline ComCallWrapper* __stdcall ComCallWrapper::InlineGetWrapper(OBJECTREF* ppO else pMainWrap = pWrap; - pMainWrap->CheckMakeAgile(*ppObj); - pWrap->AddRef(); RETURN pWrap; @@ -2336,21 +2252,6 @@ inline ADID ComCallWrapper::GetDomainID() return GetSimpleWrapper()->GetDomainID(); } - -inline void ComCallWrapper::CheckMakeAgile(OBJECTREF pObj) -{ - CONTRACTL - { - WRAPPER(THROWS); - WRAPPER(GC_TRIGGERS); - MODE_COOPERATIVE; - } - CONTRACTL_END; - - if (GetSimpleWrapper()->ShouldBeAgile()) - MakeAgile(pObj); -} - inline ULONG ComCallWrapper::GetRefCount() { CONTRACTL |