Removed unused 'Stack Walking' code (dotnet/coreclr#22039)
authorMatt Warren <matt.warren@live.co.uk>
Sat, 19 Jan 2019 19:59:40 +0000 (19:59 +0000)
committerJan Kotas <jkotas@microsoft.com>
Sat, 19 Jan 2019 19:59:40 +0000 (11:59 -0800)
As fair as I can tell `ECWGCFCrawlCallBack(..)` is not wired-up anywhere (I've successfully compiled CoreCLR locally with this change under `x86` and `x64`)

Commit migrated from https://github.com/dotnet/coreclr/commit/dce086f9bbd047296942f615f20a4f9a1e3a8d26

src/coreclr/src/vm/reflectioninvocation.cpp

index 7667ca8..7ff6ea6 100644 (file)
@@ -2082,49 +2082,6 @@ FCIMPL0(FC_BOOL_RET, ReflectionInvocation::TryEnsureSufficientExecutionStack)
 }
 FCIMPLEND
 
-struct ECWGCFContext
-{
-    BOOL fHandled;
-    Frame *pStartFrame;
-};
-
-// Crawl the stack looking for Thread Abort related information (whether we're executing inside a CER or an error handling clauses
-// of some sort).
-StackWalkAction ECWGCFCrawlCallBack(CrawlFrame* pCf, void* data)
-{
-    CONTRACTL {
-        NOTHROW;
-        GC_NOTRIGGER;
-    }
-    CONTRACTL_END;
-
-    ECWGCFContext *pData = (ECWGCFContext *)data;
-
-    Frame *pFrame = pCf->GetFrame();
-    if (pFrame && pFrame->GetFunction() != NULL && pFrame != pData->pStartFrame)
-    {
-        // We walk through a transition frame, but it is not our start frame.
-        // This means ExecuteCodeWithGuarantee is not at the bottom of stack.
-        pData->fHandled = TRUE;
-        return SWA_ABORT;
-    }
-
-    MethodDesc *pMD = pCf->GetFunction();
-
-    // Non-method frames don't interest us.
-    if (pMD == NULL)
-        return SWA_CONTINUE;
-
-    if (!pMD->GetModule()->IsSystem())
-    {
-        // We walk through some user code.  This means that ExecuteCodeWithGuarantee is not at the bottom of stack.
-        pData->fHandled = TRUE;
-        return SWA_ABORT;
-    }
-
-    return SWA_CONTINUE;
-}
-
 struct ECWGC_Param
 {
     BOOL fExceptionThrownInTryCode;