diff options
Diffstat (limited to 'src/mscorlib/src/System/Diagnostics/Stackframe.cs')
-rw-r--r-- | src/mscorlib/src/System/Diagnostics/Stackframe.cs | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/mscorlib/src/System/Diagnostics/Stackframe.cs b/src/mscorlib/src/System/Diagnostics/Stackframe.cs index 06d675ea08..13d8f5cdcc 100644 --- a/src/mscorlib/src/System/Diagnostics/Stackframe.cs +++ b/src/mscorlib/src/System/Diagnostics/Stackframe.cs @@ -8,12 +8,10 @@ namespace System.Diagnostics { using System; using System.IO; using System.Reflection; - using System.Security.Permissions; using System.Diagnostics.Contracts; // There is no good reason for the methods of this class to be virtual. [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class StackFrame { private MethodBase method; @@ -23,10 +21,8 @@ namespace System.Diagnostics { private int iLineNumber; private int iColumnNumber; -#if FEATURE_EXCEPTIONDISPATCHINFO [System.Runtime.Serialization.OptionalField] private bool fIsLastFrameFromForeignExceptionStackTrace; -#endif // FEATURE_EXCEPTIONDISPATCHINFO internal void InitMembers() { @@ -36,9 +32,7 @@ namespace System.Diagnostics { strFileName = null; iLineNumber = 0; iColumnNumber = 0; -#if FEATURE_EXCEPTIONDISPATCHINFO fIsLastFrameFromForeignExceptionStackTrace = false; -#endif // FEATURE_EXCEPTIONDISPATCHINFO } @@ -142,7 +136,6 @@ namespace System.Diagnostics { iColumnNumber = iCol; } -#if FEATURE_EXCEPTIONDISPATCHINFO internal virtual void SetIsLastFrameFromForeignExceptionStackTrace (bool fIsLastFrame) { fIsLastFrameFromForeignExceptionStackTrace = fIsLastFrame; @@ -152,7 +145,6 @@ namespace System.Diagnostics { { return fIsLastFrameFromForeignExceptionStackTrace; } -#endif // FEATURE_EXCEPTIONDISPATCHINFO // Returns the method the frame is executing // @@ -187,17 +179,6 @@ namespace System.Diagnostics { // public virtual String GetFileName() { - if (strFileName != null) - { - // This isn't really correct, but we don't have - // a permission that protects discovery of potentially - // local urls so we'll use this. - - FileIOPermission perm = new FileIOPermission( PermissionState.None ); - perm.AllFiles = FileIOPermissionAccess.PathDiscovery; - perm.Demand(); - } - return strFileName; } @@ -262,24 +243,6 @@ namespace System.Diagnostics { bool useFileName = (strFileName != null); - if (useFileName) - { - try - { - // This isn't really correct, but we don't have - // a permission that protects discovery of potentially - // local urls so we'll use this. - - FileIOPermission perm = new FileIOPermission(PermissionState.None); - perm.AllFiles = FileIOPermissionAccess.PathDiscovery; - perm.Demand(); - } - catch (System.Security.SecurityException) - { - useFileName = false; - } - } - if (!useFileName) sb.Append("<filename unknown>"); else |