[x86/Linux] Revise COMPlusThrowCallback (#8430)
authorJonghyun Park <parjong@gmail.com>
Tue, 6 Dec 2016 01:57:52 +0000 (10:57 +0900)
committerJan Kotas <jkotas@microsoft.com>
Tue, 6 Dec 2016 01:57:52 +0000 (17:57 -0800)
GetCallerToken and GetImpersonationToken methods in FrameSecurityDescriptorBaseObject
are implemented only for Windows-platform.

src/vm/excep.h
src/vm/i386/excepx86.cpp
src/vm/object.h

index f170a3e..7ef1921 100644 (file)
@@ -88,9 +88,11 @@ 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;
@@ -114,9 +116,11 @@ struct ThrowCallbackType
         pProfilerNotify = NULL;
         bReplaceStack = FALSE;
         bSkipLastElement = FALSE;
+#ifndef FEATURE_PAL
         hCallerToken = NULL;
         hImpersonationToken = NULL;
         bImpersonationTokenSet = FALSE;
+#endif // !FEATURE_PAL
         
 #ifdef _DEBUG
         pCurrentExceptionRecord = 0;
index 91dffa5..025098c 100644 (file)
@@ -2424,6 +2424,7 @@ 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)
@@ -2442,6 +2443,7 @@ StackWalkAction COMPlusThrowCallback(       // SWA value
             }
         }
     }
+#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)
index d3abce2..73ecb62 100644 (file)
@@ -2880,8 +2880,10 @@ class FrameSecurityDescriptorBaseObject : public Object
         LIMITED_METHOD_CONTRACT;
         m_declSecComputed = !!declSec;
     }
+#ifndef FEATURE_PAL
     LPVOID GetCallerToken();
     LPVOID GetImpersonationToken();
+#endif  // FEATURE_PAL
 };
 
 #ifdef FEATURE_COMPRESSEDSTACK