summaryrefslogtreecommitdiff
path: root/src/vm/comtoclrcall.cpp
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2018-10-04 10:18:23 +0200
committerGitHub <noreply@github.com>2018-10-04 10:18:23 +0200
commit11832401739148f1f1e9419cb51180ba5263a41b (patch)
tree91e81791918d307b0bc9f8255d022fd2fbfbd970 /src/vm/comtoclrcall.cpp
parent0068168531e849cbad8388f00f3f23e58d3a01b4 (diff)
downloadcoreclr-11832401739148f1f1e9419cb51180ba5263a41b.tar.gz
coreclr-11832401739148f1f1e9419cb51180ba5263a41b.tar.bz2
coreclr-11832401739148f1f1e9419cb51180ba5263a41b.zip
Remove AppDomain unload (#20250)
* Remove AppDomain unload This change removes all code in AppDomain that's related to AppDomain unloading which is obsolete in CoreCLR. It also removes all calls to the removed methods. In few places, I have made the change simpler by taking into account the fact that there is always just one AppDomain.
Diffstat (limited to 'src/vm/comtoclrcall.cpp')
-rw-r--r--src/vm/comtoclrcall.cpp49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/vm/comtoclrcall.cpp b/src/vm/comtoclrcall.cpp
index 2a60f8c2df..df1ba64a8e 100644
--- a/src/vm/comtoclrcall.cpp
+++ b/src/vm/comtoclrcall.cpp
@@ -615,62 +615,13 @@ void COMToCLRWorkerBodyWithADTransition(
BEGIN_SO_INTOLERANT_CODE_NOTHROW(pThread, { *pRetValOut = COR_E_STACKOVERFLOW; return; } );
EX_TRY
{
- bool fNeedToTranslateTAEtoADUE = false;
ADID pTgtDomain = pWrap->GetDomainID();
ENTER_DOMAIN_ID(pTgtDomain)
{
fEnteredDomain = TRUE;
COMToCLRWorkerBody_SOIntolerant(pThread, pFrame, pWrap, pRetValOut);
-
- //
- // Below is some logic adapted from Thread::RaiseCrossContextExceptionHelper, which we now
- // bypass because the IL stub is catching the ThreadAbortException instead of a proper domain
- // transition, where the logic typically resides. This code applies some policy to transform
- // the ThreadAbortException into an AppDomainUnloadedException and sets up the HRESULT and
- // IErrorInfo accordingly.
- //
-
- // If the IL stub caught a TAE...
- if (COR_E_THREADABORTED == ((HRESULT)*pRetValOut))
- {
- // ...first, make sure it was actually an HRESULT return value...
- ComCallMethodDesc* pCMD = pFrame->GetComCallMethodDesc();
- if (pCMD->IsNativeHResultRetVal())
- {
- // There may be multiple AD transitions on the stack so the current unload boundary may
- // not be the transition frame that was set up to make our AD switch. Detect that by
- // comparing the unload boundary's Next with our ComMethodFrame and proceed to translate
- // the exception to ADUE only if they match. Otherwise the exception should stay as TAE.
-
- Frame* pUnloadBoundary = pThread->GetUnloadBoundaryFrame();
- // ...and we are at an unload boundary with a pending unload...
- if ( ( pUnloadBoundary != NULL
- && (pUnloadBoundary->Next() == pFrame
- && pThread->ShouldChangeAbortToUnload(pUnloadBoundary, pUnloadBoundary))
- )
- // ... or we don't have an unload boundary, but we're otherwise unloading
- // this domain from another thread (and we aren't the finalizer)...
- || ( (NULL == pUnloadBoundary)
- && (pThread->GetDomain() == SystemDomain::AppDomainBeingUnloaded())
- && (pThread != SystemDomain::System()->GetUnloadingThread())
- && (pThread != FinalizerThread::GetFinalizerThread())
- )
- )
- {
- // ... we take note and then create an ADUE in the domain we're returning to.
- fNeedToTranslateTAEtoADUE = true;
- }
- }
- }
}
END_DOMAIN_TRANSITION;
-
- if (fNeedToTranslateTAEtoADUE)
- {
- EEResourceException ex(kAppDomainUnloadedException, W("Remoting_AppDomainUnloaded_ThreadUnwound"));
- OBJECTREF oEx = CLRException::GetThrowableFromException(&ex);
- *pRetValOut = SetupErrorInfo(oEx, pFrame->GetComCallMethodDesc());
- }
}
EX_CATCH
{