2009-09-09 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Wed, 9 Sep 2009 14:10:10 +0000 (14:10 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Wed, 9 Sep 2009 14:10:10 +0000 (14:10 -0000)
* SecurityManager.cs, SecurityManager_2_1.cs: Replace existing
throw methods (for coreclr) with a single one.

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

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

index c3a449658dcaffdefb34ac22c2b80ebb4feeae74..4ff04c212811d3e1128d51e6a10e5dc82609cb75 100644 (file)
@@ -1,3 +1,8 @@
+2009-09-09  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * SecurityManager.cs, SecurityManager_2_1.cs: Replace existing
+       throw methods (for coreclr) with a single one.
+
 2009-05-02  Sebastien Pouliot  <sebastien@ximian.com>
 
        * CodeAccessPermission.cs (ThrowSecurityException): Don't include
index 41546c13e97c10d0a666d75cc170d8c5a2618939..7e9ee77a65a0c024bc884e286668fcc24d73f799 100644 (file)
@@ -736,14 +736,11 @@ namespace System.Security {
                        throw new SecurityException (message, an, granted, refused, method, SecurityAction.InheritanceDemand, null, null, null);
                }
 
-               private static void FieldAccessException (IntPtr caller, IntPtr field)
-               {
-                       throw new FieldAccessException (Locale.GetText ("Field access not allowed."));
-               }
+               // called by the runtime when CoreCLR is enabled
 
-               private static void MethodAccessException (IntPtr caller, IntPtr callee)
+               private static void ThrowException (Exception ex)
                {
-                       throw new MethodAccessException (Locale.GetText ("Method call not allowed."));
+                       throw ex;
                }
 
                // internal - get called by the class loader
index f79b2b177a7a3fea5f0703d98a846d6bd93c69c5..21f7009d827d3ff18bfcdf4ee34f1cb69ca254fe 100644 (file)
@@ -101,14 +101,9 @@ namespace System.Security {
 
                // called by the runtime when CoreCLR is enabled
 
-               private static void FieldAccessException (IntPtr caller, IntPtr field)
+               private static void ThrowException (Exception ex)
                {
-                       throw new FieldAccessException (Locale.GetText ("Field access not allowed."));
-               }
-
-               private static void MethodAccessException (IntPtr caller, IntPtr callee)
-               {
-                       throw new MethodAccessException (Locale.GetText ("Method call not allowed."));
+                       throw ex;
                }
 
                // internal - get called by the class loader