summaryrefslogtreecommitdiff
path: root/src/vm
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2016-12-21 20:08:37 -0800
committerGitHub <noreply@github.com>2016-12-21 20:08:37 -0800
commit1d03b8fd8d650bd215623a7b035e68db96697e59 (patch)
treecc7d0f02fb81c4c0138bd65099a899383add7277 /src/vm
parente88965d26433025ff36b9164b06833ca2253b61c (diff)
downloadcoreclr-1d03b8fd8d650bd215623a7b035e68db96697e59.tar.gz
coreclr-1d03b8fd8d650bd215623a7b035e68db96697e59.tar.bz2
coreclr-1d03b8fd8d650bd215623a7b035e68db96697e59.zip
Delete FEATURE_LEGACYSURFACE (#8704)
Diffstat (limited to 'src/vm')
-rw-r--r--src/vm/ceemain.cpp2
-rw-r--r--src/vm/ecalllist.h3
-rw-r--r--src/vm/excep.h11
-rw-r--r--src/vm/exceptionhandling.cpp55
-rw-r--r--src/vm/exceptionhandling.h12
-rw-r--r--src/vm/exstatecommon.h6
-rw-r--r--src/vm/i386/excepx86.cpp44
-rw-r--r--src/vm/mscorlib.cpp2
-rw-r--r--src/vm/mscorlib.h4
-rw-r--r--src/vm/object.cpp15
-rw-r--r--src/vm/object.h8
11 files changed, 4 insertions, 158 deletions
diff --git a/src/vm/ceemain.cpp b/src/vm/ceemain.cpp
index 5521d8a4d9..0f455f17eb 100644
--- a/src/vm/ceemain.cpp
+++ b/src/vm/ceemain.cpp
@@ -177,7 +177,7 @@
#include "ipcfunccall.h"
#include "perflog.h"
#include "../dlls/mscorrc/resource.h"
-#if defined(FEATURE_LEGACYSURFACE) || defined(FEATURE_USE_LCID)
+#ifdef FEATURE_USE_LCID
#include "nlsinfo.h"
#endif
#include "util.hpp"
diff --git a/src/vm/ecalllist.h b/src/vm/ecalllist.h
index b110d0eea6..46b18321b2 100644
--- a/src/vm/ecalllist.h
+++ b/src/vm/ecalllist.h
@@ -1324,9 +1324,6 @@ FCFuncStart(gThreadFuncs)
FCFuncElement("BeginThreadAffinity", ThreadNative::BeginThreadAffinity)
FCFuncElement("EndThreadAffinity", ThreadNative::EndThreadAffinity)
#endif // FEATURE_CORECLR
-#ifdef FEATURE_LEGACYSURFACE
- FCFuncElement("AbortInternal", ThreadNative::Abort)
-#endif // FEATURE_LEGACYSURFACE
#ifndef FEATURE_CORECLR
FCFuncElement("ResetAbortNative", ThreadNative::ResetAbort)
#endif // FEATURE_CORECLR
diff --git a/src/vm/excep.h b/src/vm/excep.h
index 7ef1921593..e50a770e27 100644
--- a/src/vm/excep.h
+++ b/src/vm/excep.h
@@ -88,11 +88,6 @@ struct ThrowCallbackType
MethodDesc * pProfilerNotify; // Context for profiler callbacks -- see COMPlusFrameHandler().
BOOL bReplaceStack; // Used to pass info to SaveStackTrace call
BOOL bSkipLastElement;// Used to pass info to SaveStackTrace call
-#ifndef FEATURE_PAL
- HANDLE hCallerToken;
- HANDLE hImpersonationToken;
- BOOL bImpersonationTokenSet;
-#endif // !FEATURE_PAL
#ifdef _DEBUG
void * pCurrentExceptionRecord;
void * pPrevExceptionRecord;
@@ -116,12 +111,6 @@ struct ThrowCallbackType
pProfilerNotify = NULL;
bReplaceStack = FALSE;
bSkipLastElement = FALSE;
-#ifndef FEATURE_PAL
- hCallerToken = NULL;
- hImpersonationToken = NULL;
- bImpersonationTokenSet = FALSE;
-#endif // !FEATURE_PAL
-
#ifdef _DEBUG
pCurrentExceptionRecord = 0;
pPrevExceptionRecord = 0;
diff --git a/src/vm/exceptionhandling.cpp b/src/vm/exceptionhandling.cpp
index ed155eb998..1a839bea96 100644
--- a/src/vm/exceptionhandling.cpp
+++ b/src/vm/exceptionhandling.cpp
@@ -7,10 +7,6 @@
#include "common.h"
-#ifndef FEATURE_PAL
-#include "securityprincipal.h"
-#endif // !FEATURE_PAL
-
#ifdef WIN64EXCEPTIONS
#include "exceptionhandling.h"
#include "dbginterface.h"
@@ -2871,28 +2867,6 @@ CLRUnwindStatus ExceptionTracker::ProcessManagedCallFrame(
// we probably don't want to be so strict in not calling handlers.
if (! IsStackOverflowException())
{
-#ifndef FEATURE_PAL
- // Check for any impersonation on the frame and save that for use during EH filter callbacks
- OBJECTREF* pRefSecDesc = pcfThisFrame->GetAddrOfSecurityObject();
- if (pRefSecDesc != NULL && *pRefSecDesc != NULL)
- {
- GCX_COOP();
- FRAMESECDESCREF fsdRef = (FRAMESECDESCREF)*pRefSecDesc;
- if (fsdRef->GetCallerToken() != NULL)
- {
- m_hCallerToken = fsdRef->GetCallerToken();
- STRESS_LOG1(LF_EH, LL_INFO100, "In COMPlusThrowCallback. Found non-NULL callertoken on FSD:%d\n",m_hCallerToken);
- if (!m_ExceptionFlags.ImpersonationTokenSet())
- {
- m_hImpersonationToken = fsdRef->GetImpersonationToken();
- STRESS_LOG1(LF_EH, LL_INFO100, "In COMPlusThrowCallback. Found non-NULL impersonationtoken on FSD:%d\n",m_hImpersonationToken);
- m_ExceptionFlags.SetImpersonationTokenSet();
- }
- }
- }
- BOOL impersonating = FALSE;
-#endif // !FEATURE_PAL
-
// Save the current EHClause Index and Establisher of the clause post which
// ThreadAbort was raised. This is done an exception handled inside a filter
// reset the state that was setup before the filter was invoked.
@@ -2905,16 +2879,6 @@ CLRUnwindStatus ExceptionTracker::ProcessManagedCallFrame(
EX_TRY
{
-#ifndef FEATURE_PAL
- if (m_hCallerToken != NULL)
- {
- STRESS_LOG1(LF_EH, LL_INFO100, "About to call filter with hCallerToken = %d\n",m_hCallerToken);
- // CLR_ImpersonateLoggedOnUser fails fast on error
- COMPrincipal::CLR_ImpersonateLoggedOnUser(m_hCallerToken);
- impersonating = TRUE;
- }
-#endif // !FEATURE_PAL
-
// We want to call filters even if the thread is aborting, so suppress abort
// checks while the filter runs.
ThreadPreventAsyncHolder preventAbort(TRUE);
@@ -2944,29 +2908,10 @@ CLRUnwindStatus ExceptionTracker::ProcessManagedCallFrame(
GCX_COOP();
dwResult = CallHandler(dwFilterStartPC, sf, &EHClause, pMD, Filter ARM_ARG(pCurRegDisplay->pCallerContext) ARM64_ARG(pCurRegDisplay->pCallerContext));
}
-
-#ifndef FEATURE_PAL
- if (impersonating)
- {
- STRESS_LOG1(LF_EH, LL_INFO100, "After calling filter, resetting to hImpersonationToken = %d\n",m_hImpersonationToken);
- // CLR_ImpersonateLoggedOnUser fails fast on error
- COMPrincipal::CLR_ImpersonateLoggedOnUser(m_hImpersonationToken);
- impersonating = FALSE;
- }
-#endif // !FEATURE_PAL
}
EX_CATCH
{
// We had an exception in filter invocation that remained unhandled.
-#ifndef FEATURE_PAL
- if (impersonating)
- {
- STRESS_LOG1(LF_EH, LL_INFO100, "Filter threw exception. In Catch. Resetting to hImpersonationToken = %d\n",m_hImpersonationToken);
- // CLR_ImpersonateLoggedOnUser fails fast on error
- COMPrincipal::CLR_ImpersonateLoggedOnUser(m_hImpersonationToken);
- impersonating = FALSE;
- }
-#endif // !FEATURE_PAL
// Sync managed exception state, for the managed thread, based upon the active exception tracker.
pThread->SyncManagedExceptionState(false);
diff --git a/src/vm/exceptionhandling.h b/src/vm/exceptionhandling.h
index 340cbc0d6d..8b675d596d 100644
--- a/src/vm/exceptionhandling.h
+++ b/src/vm/exceptionhandling.h
@@ -69,9 +69,7 @@ public:
ExceptionTracker() :
m_pThread(NULL),
- m_hThrowable(NULL),
- m_hCallerToken(NULL),
- m_hImpersonationToken(NULL)
+ m_hThrowable(NULL)
{
#ifndef DACCESS_COMPILE
m_StackTraceInfo.Init();
@@ -125,9 +123,7 @@ public:
// these members were added for resume frame processing
m_pClauseForCatchToken(NULL),
// end resume frame members
- m_ExceptionCode(pExceptionRecord->ExceptionCode),
- m_hCallerToken(NULL),
- m_hImpersonationToken(NULL)
+ m_ExceptionCode(pExceptionRecord->ExceptionCode)
{
m_ptrs.ExceptionRecord = pExceptionRecord;
m_ptrs.ContextRecord = pContextRecord;
@@ -749,10 +745,6 @@ private: ;
DWORD m_ExceptionCode;
PTR_Frame m_pLimitFrame;
-
- // Thread Security State
- HANDLE m_hCallerToken;
- HANDLE m_hImpersonationToken;
#ifdef DEBUGGING_SUPPORTED
//
diff --git a/src/vm/exstatecommon.h b/src/vm/exstatecommon.h
index a0f5a0bb3d..7c505b8bac 100644
--- a/src/vm/exstatecommon.h
+++ b/src/vm/exstatecommon.h
@@ -380,10 +380,6 @@ public:
void SetDebuggerInterceptInfo() { LIMITED_METHOD_DAC_CONTRACT; AssertIfReadOnly(); m_flags |= Ex_DebuggerInterceptInfo; }
#endif
- BOOL ImpersonationTokenSet() { LIMITED_METHOD_CONTRACT; return m_flags & Ex_ImpersonationTokenSet; }
- void SetImpersonationTokenSet() { LIMITED_METHOD_CONTRACT; AssertIfReadOnly(); m_flags |= Ex_ImpersonationTokenSet; }
- void ResetImpersonationTokenSet() { LIMITED_METHOD_CONTRACT; AssertIfReadOnly(); m_flags &= ~Ex_ImpersonationTokenSet; }
-
BOOL WasThrownByUs() { LIMITED_METHOD_CONTRACT; return m_flags & Ex_WasThrownByUs; }
void SetWasThrownByUs() { LIMITED_METHOD_CONTRACT; AssertIfReadOnly(); m_flags |= Ex_WasThrownByUs; }
void ResetWasThrownByUs() { LIMITED_METHOD_CONTRACT; AssertIfReadOnly(); m_flags &= ~Ex_WasThrownByUs; }
@@ -410,7 +406,7 @@ private:
Ex_DebuggerInterceptNotPossible = 0x00000400,
Ex_IsUnhandled = 0x00000800,
#endif
- Ex_ImpersonationTokenSet = 0x00001000,
+ // Unused = 0x00001000,
Ex_WasThrownByUs = 0x00002000,
diff --git a/src/vm/i386/excepx86.cpp b/src/vm/i386/excepx86.cpp
index 71200f671f..c6a95ef555 100644
--- a/src/vm/i386/excepx86.cpp
+++ b/src/vm/i386/excepx86.cpp
@@ -2274,19 +2274,11 @@ int COMPlusThrowCallbackHelper(IJitManager *pJitManager,
CONTRACTL_END;
int iFilt = 0;
- BOOL impersonating = FALSE;
#ifndef FEATURE_PAL
EX_TRY
{
GCPROTECT_BEGIN (throwable);
- if (pData->hCallerToken != NULL)
- {
- STRESS_LOG1(LF_EH, LL_INFO100, "In COMPlusThrowCallbackHelper hCallerToken = %d\n",pData->hCallerToken);
- // CLR_ImpersonateLoggedOnUser fails fast on error
- COMPrincipal::CLR_ImpersonateLoggedOnUser(pData->hCallerToken);
- impersonating = TRUE;
- }
// We want to call filters even if the thread is aborting, so suppress abort
// checks while the filter runs.
@@ -2295,25 +2287,10 @@ int COMPlusThrowCallbackHelper(IJitManager *pJitManager,
BYTE* startAddress = (BYTE*)pCf->GetCodeInfo()->GetStartAddress();
iFilt = ::CallJitEHFilter(pCf, startAddress, EHClausePtr, nestingLevel, throwable);
- if (impersonating)
- {
- STRESS_LOG1(LF_EH, LL_INFO100, "In COMPlusThrowCallbackHelper hImpersonationToken = %d\n",pData->hImpersonationToken);
- // CLR_ImpersonateLoggedOnUser fails fast on error
- COMPrincipal::CLR_ImpersonateLoggedOnUser(pData->hImpersonationToken);
- impersonating = FALSE;
- }
GCPROTECT_END();
}
EX_CATCH
{
- if (impersonating)
- {
- STRESS_LOG1(LF_EH, LL_INFO100, "In COMPlusThrowCallbackHelper EX_CATCH hImpersonationToken = %d\n",pData->hImpersonationToken);
- // CLR_ImpersonateLoggedOnUser fails fast on error
- COMPrincipal::CLR_ImpersonateLoggedOnUser(pData->hImpersonationToken);
- impersonating = FALSE;
- }
-
// We had an exception in filter invocation that remained unhandled.
// Sync managed exception state, for the managed thread, based upon the active exception tracker.
pThread->SyncManagedExceptionState(false);
@@ -2445,27 +2422,6 @@ StackWalkAction COMPlusThrowCallback( // SWA value
pData->bSkipLastElement = FALSE;
}
-#ifndef FEATURE_PAL
- // Check for any impersonation on the frame and save that for use during EH filter callbacks
- OBJECTREF* pRefSecDesc = pCf->GetAddrOfSecurityObject();
- if (pRefSecDesc != NULL && *pRefSecDesc != NULL)
- {
- FRAMESECDESCREF fsdRef = (FRAMESECDESCREF)*pRefSecDesc;
- if (fsdRef->GetCallerToken() != NULL)
- {
- // Impersonation info present on the Frame
- pData->hCallerToken = fsdRef->GetCallerToken();
- STRESS_LOG1(LF_EH, LL_INFO100, "In COMPlusThrowCallback. Found non-NULL callertoken on FSD:%d\n",pData->hCallerToken);
- if (!pData->bImpersonationTokenSet)
- {
- pData->hImpersonationToken = fsdRef->GetImpersonationToken();
- STRESS_LOG1(LF_EH, LL_INFO100, "In COMPlusThrowCallback. Found non-NULL impersonationtoken on FSD:%d\n",pData->hImpersonationToken);
- pData->bImpersonationTokenSet = TRUE;
- }
- }
- }
-#endif // !FEATURE_PAL
-
// now we've got the stack trace, if we aren't allowed to catch this and we're first pass, return
if (pData->bDontCatch)
return SWA_CONTINUE;
diff --git a/src/vm/mscorlib.cpp b/src/vm/mscorlib.cpp
index 7681028653..b6fef9eaaa 100644
--- a/src/vm/mscorlib.cpp
+++ b/src/vm/mscorlib.cpp
@@ -34,9 +34,7 @@
#include "customattribute.h"
#include "comdynamic.h"
#include "commethodrental.h"
-#ifndef FEATURE_LEGACYSURFACEAREA
#include "nlsinfo.h"
-#endif
#include "calendardata.h"
#include "commodule.h"
#include "marshalnative.h"
diff --git a/src/vm/mscorlib.h b/src/vm/mscorlib.h
index 20d658b2e1..cb958687a4 100644
--- a/src/vm/mscorlib.h
+++ b/src/vm/mscorlib.h
@@ -797,10 +797,6 @@ DEFINE_FIELD_U(m_assertAllPossible,FrameSecurityDescriptorBaseObject, m_assertA
DEFINE_FIELD_U(m_DeclarativeAssertions, FrameSecurityDescriptorBaseObject, m_DeclarativeAssertions)
DEFINE_FIELD_U(m_DeclarativeDenials, FrameSecurityDescriptorBaseObject, m_DeclarativeDenials)
DEFINE_FIELD_U(m_DeclarativeRestrictions, FrameSecurityDescriptorBaseObject, m_DeclarativeRestrictions)
-#ifndef FEATURE_PAL
-DEFINE_FIELD_U(m_callerToken, FrameSecurityDescriptorBaseObject, m_callerToken)
-DEFINE_FIELD_U(m_impToken, FrameSecurityDescriptorBaseObject, m_impToken)
-#endif
DEFINE_CLASS(FRAME_SECURITY_DESCRIPTOR, Security, FrameSecurityDescriptor)
DEFINE_CLASS(GUID, System, Guid)
diff --git a/src/vm/object.cpp b/src/vm/object.cpp
index 531c0015f2..b219eb9e50 100644
--- a/src/vm/object.cpp
+++ b/src/vm/object.cpp
@@ -33,21 +33,6 @@ void* CompressedStackObject::GetUnmanagedCompressedStack()
}
#endif // FEATURE_COMPRESSEDSTACK
-#ifndef FEATURE_PAL
-LPVOID FrameSecurityDescriptorBaseObject::GetCallerToken()
-{
- LIMITED_METHOD_CONTRACT;
- return ((m_callerToken!= NULL)?m_callerToken->GetHandle():NULL);
-
-}
-
-LPVOID FrameSecurityDescriptorBaseObject::GetImpersonationToken()
-{
- LIMITED_METHOD_CONTRACT;
- return ((m_impToken != NULL)?m_impToken->GetHandle():NULL);
-}
-#endif
-
SVAL_IMPL(INT32, ArrayBase, s_arrayBoundsZero);
// follow the necessary rules to get a new valid hashcode for an object
diff --git a/src/vm/object.h b/src/vm/object.h
index 73ecb62b80..9a2c817ac1 100644
--- a/src/vm/object.h
+++ b/src/vm/object.h
@@ -2743,10 +2743,6 @@ class FrameSecurityDescriptorBaseObject : public Object
OBJECTREF m_DeclarativeAssertions;
OBJECTREF m_DeclarativeDenials;
OBJECTREF m_DeclarativeRestrictions;
-#ifndef FEATURE_PAL
- SAFEHANDLEREF m_callerToken; // the thread token (or process token if there was no thread token) when a call to Impersonate was made ("previous" token)
- SAFEHANDLEREF m_impToken; // the thread token after a call to Impersonate is made (the "current" impersonation)
-#endif // !FEATURE_PAL
CLR_BOOL m_assertFT;
CLR_BOOL m_assertAllPossible;
CLR_BOOL m_declSecComputed;
@@ -2880,10 +2876,6 @@ class FrameSecurityDescriptorBaseObject : public Object
LIMITED_METHOD_CONTRACT;
m_declSecComputed = !!declSec;
}
-#ifndef FEATURE_PAL
- LPVOID GetCallerToken();
- LPVOID GetImpersonationToken();
-#endif // FEATURE_PAL
};
#ifdef FEATURE_COMPRESSEDSTACK