Author: spouliot
Date: 2005-03-14 18:14:02 -0500 (Mon, 14 Mar 2005)
New Revision: 41812
Modified:
trunk/mcs/class/corlib/System.Diagnostics/ChangeLog
trunk/mcs/class/corlib/System.Diagnostics/StackFrame.cs
trunk/mcs/class/corlib/System.Diagnostics/StackTrace.cs
Log:
2005-03-14 Sebastien Pouliot <[EMAIL PROTECTED]>
* StackFrame.cs: Fix CAS unit tests for NET_1_1.
* StackTrace.cs: Fix CAS unit tests for NET_1_1.
Modified: trunk/mcs/class/corlib/System.Diagnostics/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Diagnostics/ChangeLog 2005-03-14 23:13:06 UTC
(rev 41811)
+++ trunk/mcs/class/corlib/System.Diagnostics/ChangeLog 2005-03-14 23:14:02 UTC
(rev 41812)
@@ -1,3 +1,8 @@
+2005-03-14 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * StackFrame.cs: Fix CAS unit tests for NET_1_1.
+ * StackTrace.cs: Fix CAS unit tests for NET_1_1.
+
2005-03-04 Zoltan Varga <[EMAIL PROTECTED]>
* StackFrame.cs: Add an internalMethodName field to return info about
Modified: trunk/mcs/class/corlib/System.Diagnostics/StackFrame.cs
===================================================================
--- trunk/mcs/class/corlib/System.Diagnostics/StackFrame.cs 2005-03-14
23:13:06 UTC (rev 41811)
+++ trunk/mcs/class/corlib/System.Diagnostics/StackFrame.cs 2005-03-14
23:14:02 UTC (rev 41812)
@@ -229,10 +229,12 @@
/// </returns>
public virtual string GetFileName()
{
+#if NET_2_0
if (SecurityManager.SecurityEnabled && (fileName !=
null) && (fileName.Length > 0)) {
string fn = Path.GetFullPath (fileName);
new FileIOPermission
(FileIOPermissionAccess.PathDiscovery, fn).Demand ();
}
+#endif
return fileName;
}
@@ -257,7 +259,10 @@
/// <returns>
/// The method the frame is executing in.
/// </returns>
- public virtual MethodBase GetMethod()
+#if ONLY_1_1
+ [ReflectionPermission (SecurityAction.Demand, TypeInformation =
true)]
+#endif
+ public virtual MethodBase GetMethod ()
{
return methodBase;
}
@@ -275,11 +280,11 @@
return nativeOffset;
}
- internal string GetInternalMethodName ()
- {
- return internalMethodName;
- }
-
+ internal string GetInternalMethodName ()
+ {
+ return internalMethodName;
+ }
+
/// <summary>
/// Builds a readable representation of the stack frame.
/// </summary>
Modified: trunk/mcs/class/corlib/System.Diagnostics/StackTrace.cs
===================================================================
--- trunk/mcs/class/corlib/System.Diagnostics/StackTrace.cs 2005-03-14
23:13:06 UTC (rev 41811)
+++ trunk/mcs/class/corlib/System.Diagnostics/StackTrace.cs 2005-03-14
23:14:02 UTC (rev 41812)
@@ -33,6 +33,7 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
+using System.Security.Permissions;
using System.Text;
using System.Threading;
@@ -114,12 +115,18 @@
frames = get_trace (e, skipFrames, needFileInfo);
}
+#if ONLY_1_1
+ [ReflectionPermission (SecurityAction.Demand, TypeInformation =
true)]
+#endif
public StackTrace (StackFrame frame)
{
this.frames = new StackFrame [1];
this.frames [0] = frame;
}
+#if ONLY_1_1
+ [ReflectionPermission (SecurityAction.Demand, TypeInformation =
true)]
+#endif
[MonoTODO]
public StackTrace (Thread targetThread, bool needFileInfo)
{
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches