2007-08-28 Mark Probst <mark.probst@gmail.com>
authorMark Probst <mark.probst@gmail.com>
Tue, 28 Aug 2007 09:42:00 +0000 (09:42 -0000)
committerMark Probst <mark.probst@gmail.com>
Tue, 28 Aug 2007 09:42:00 +0000 (09:42 -0000)
* SecurityManager.cs: Changed method argument of
LinkDemandSecurityException to IntPtr and removed the assembly
argument (which can be gotten to via the method), to avoid having
to embed reference object values in the native code.

svn path=/trunk/mcs/; revision=84932

mcs/class/corlib/System.Security/ChangeLog
mcs/class/corlib/System.Security/SecurityManager.cs

index e5ce00b9532c81dd9d22281a862d9417748f7523..6c7c1da47eb23e80c63f57748288ed28dc0fdece 100644 (file)
@@ -1,3 +1,10 @@
+2007-08-28  Mark Probst  <mark.probst@gmail.com>
+
+       * SecurityManager.cs: Changed method argument of
+       LinkDemandSecurityException to IntPtr and removed the assembly
+       argument (which can be gotten to via the method), to avoid having
+       to embed reference object values in the native code.
+
 2007-08-20  Mark Probst  <mark.probst@gmail.com>
 
        * SecurityManager.cs: Changed arguments of MethodAccessException
index ea848fb90d905ada3df8aaf38a0acfef9a30e896..aa2f66430797ebce0ad83e5bb52d4660d685f368 100644 (file)
@@ -668,8 +668,12 @@ namespace System.Security {
                }
 
                // we try to provide as much details as possible to help debugging
-               private static void LinkDemandSecurityException (int securityViolation, Assembly a, MethodInfo method)
+               private static void LinkDemandSecurityException (int securityViolation, IntPtr methodHandle)
                {
+                       RuntimeMethodHandle runtimeHandle = new RuntimeMethodHandle (methodHandle);
+                       MethodInfo method = (MethodInfo)(MethodBase.GetMethodFromHandle (runtimeHandle));
+                       Assembly a = method.DeclaringType.Assembly;
+
                        string message = null;
                        AssemblyName an = null;
                        PermissionSet granted = null;