https://bugzilla.novell.com/show_bug.cgi?id=665788

https://bugzilla.novell.com/show_bug.cgi?id=665788#c2


Jb Evain <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #2 from Jb Evain <[email protected]> 2011-01-20 11:00:47 UTC ---
net always throws an InvalidOperationException when trying to get the
MethodBody of a dynamic method.

Proposed patch:

<<<<<<<<<<<<<<
diff --git a/mono/metadata/reflection.c b/mono/metadata/reflection.c
index 29a05d3..0cbcd19 100644
--- a/mono/metadata/reflection.c
+++ b/mono/metadata/reflection.c
@@ -6861,6 +6861,9 @@ mono_method_body_get_object (MonoDomain *domain,
MonoMethod *method)
     unsigned char format, flags;
     int i;

+    if (method->dynamic)
+        mono_raise_exception (mono_get_exception_invalid_operation (NULL));
+
     if (!System_Reflection_MethodBody)
         System_Reflection_MethodBody = mono_class_from_name
(mono_defaults.corlib, "System.Reflection", "MethodBody");
     if (!System_Reflection_LocalVariableInfo)

<<<<<<<<<<<<<<

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to