Author: mprobst
Date: 2007-08-28 05:47:17 -0400 (Tue, 28 Aug 2007)
New Revision: 84933
Modified:
trunk/mono/mono/metadata/ChangeLog
trunk/mono/mono/metadata/security-manager.c
trunk/mono/mono/mini/ChangeLog
trunk/mono/mono/mini/mini.c
Log:
2007-08-28 Mark Probst <[EMAIL PROTECTED]>
* security-manager.c (mono_security_manager_get_methods):
LinkDemandSecurityException now has 2 arguments instead of 3.
2007-08-28 Mark Probst <[EMAIL PROTECTED]>
* mini.c (check_linkdemand): Remove embedded reference object in
call to LinkDemandSecurityException.
(mono_jit_compile_method_inner): Call LinkDemandSecurityException
with an IntPtr instead of a reference object.
Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog 2007-08-28 09:42:00 UTC (rev 84932)
+++ trunk/mono/mono/metadata/ChangeLog 2007-08-28 09:47:17 UTC (rev 84933)
@@ -1,3 +1,8 @@
+2007-08-28 Mark Probst <[EMAIL PROTECTED]>
+
+ * security-manager.c (mono_security_manager_get_methods):
+ LinkDemandSecurityException now has 2 arguments instead of 3.
+
2007-08-27 Zoltan Varga <[EMAIL PROTECTED]>
* class.c (mono_class_layout_fields): Only do the struct alignment hack
on
Modified: trunk/mono/mono/metadata/security-manager.c
===================================================================
--- trunk/mono/mono/metadata/security-manager.c 2007-08-28 09:42:00 UTC (rev
84932)
+++ trunk/mono/mono/metadata/security-manager.c 2007-08-28 09:47:17 UTC (rev
84933)
@@ -80,7 +80,7 @@
g_assert (secman.linkdemandfulltrust);
secman.linkdemandsecurityexception = mono_class_get_method_from_name
(secman.securitymanager,
- "LinkDemandSecurityException", 3);
+ "LinkDemandSecurityException", 2);
g_assert (secman.linkdemandsecurityexception);
secman.allowpartiallytrustedcallers = mono_class_from_name
(mono_defaults.corlib, "System.Security",
Modified: trunk/mono/mono/mini/ChangeLog
===================================================================
--- trunk/mono/mono/mini/ChangeLog 2007-08-28 09:42:00 UTC (rev 84932)
+++ trunk/mono/mono/mini/ChangeLog 2007-08-28 09:47:17 UTC (rev 84933)
@@ -1,3 +1,10 @@
+2007-08-28 Mark Probst <[EMAIL PROTECTED]>
+
+ * mini.c (check_linkdemand): Remove embedded reference object in
+ call to LinkDemandSecurityException.
+ (mono_jit_compile_method_inner): Call LinkDemandSecurityException
+ with an IntPtr instead of a reference object.
+
2007-08-28 Zoltan Varga <[EMAIL PROTECTED]>
* mini.c (handle_initobj): Handle alignment properly.
Modified: trunk/mono/mono/mini/mini.c
===================================================================
--- trunk/mono/mono/mini/mini.c 2007-08-28 09:42:00 UTC (rev 84932)
+++ trunk/mono/mono/mini/mini.c 2007-08-28 09:47:17 UTC (rev 84933)
@@ -3763,15 +3763,11 @@
if (result == MONO_JIT_LINKDEMAND_ECMA) {
/* Generate code to throw a SecurityException before the actual
call/link */
- MonoAssembly *assembly = mono_image_get_assembly
(caller->klass->image);
- MonoReflectionAssembly *refass = (MonoReflectionAssembly*)
mono_assembly_get_object (cfg->domain, assembly);
- MonoReflectionMethod *refmet = mono_method_get_object
(cfg->domain, caller, NULL);
MonoSecurityManager *secman = mono_security_manager_get_methods
();
- MonoInst *args [3];
+ MonoInst *args [2];
NEW_ICONST (cfg, args [0], 4);
- NEW_PCONST (cfg, args [1], refass);
- NEW_PCONST (cfg, args [2], refmet);
+ NEW_METHODCONST (cfg, args [1], caller);
mono_emit_method_call_spilled (cfg, bblock,
secman->linkdemandsecurityexception, mono_method_signature
(secman->linkdemandsecurityexception), args, ip, NULL);
} else if (cfg->exception_type == MONO_EXCEPTION_NONE) {
/* don't hide previous results */
@@ -10915,16 +10911,12 @@
}
/* this can only be set if the security manager is active */
case MONO_EXCEPTION_SECURITY_LINKDEMAND: {
- MonoAssembly *assembly = mono_image_get_assembly
(method->klass->image);
- MonoReflectionAssembly *refass = (MonoReflectionAssembly*)
mono_assembly_get_object (target_domain, assembly);
- MonoReflectionMethod *refmet = mono_method_get_object
(target_domain, method, NULL);
MonoSecurityManager* secman = mono_security_manager_get_methods
();
MonoObject *exc = NULL;
- gpointer args [3];
+ gpointer args [2];
args [0] = &cfg->exception_data;
- args [1] = refass;
- args [2] = refmet;
+ args [1] = &method;
mono_runtime_invoke (secman->linkdemandsecurityexception, NULL,
args, &exc);
mono_destroy_compile (cfg);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches