2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
authorBernie Solomon <bernard@mono-cvs.ximian.com>
Fri, 31 Oct 2003 03:56:09 +0000 (03:56 -0000)
committerBernie Solomon <bernard@mono-cvs.ximian.com>
Fri, 31 Oct 2003 03:56:09 +0000 (03:56 -0000)
* interp.c: (ves_exec_method_with_context)
fix CEE_NEWOBJ inside wrapper methods

svn path=/trunk/mono/; revision=19495

mono/interpreter/ChangeLog
mono/interpreter/interp.c

index 6e8c32f36051918e9ac3eb0b7184ada7036393ca..e3ec219925446c372576c84ec9482f6603a130cf 100644 (file)
@@ -1,8 +1,9 @@
 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
 
        * interp.c: (ves_exec_method_with_context)
-       we need to lookup internal calls now
-       don't free type in CEE_SIZEOF
+       we need to lookup internal calls now.
+       don't free type in CEE_SIZEOF.
+       fix CEE_NEWOBJ inside wrapper methods
 
 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
 
index 4ceedac92cf3b91be21f9ea202326defb034047b..9b2583776bf83796b5a59a391942bd75cf150a98 100644 (file)
@@ -3038,7 +3038,11 @@ ves_exec_method_with_context (MonoInvocation *frame, ThreadContext *context)
                        token = read32 (ip);
                        ip += 4;
 
-                       if (!(child_frame.method = mono_get_method (image, token, NULL)))
+                       if (frame->method->wrapper_type != MONO_WRAPPER_NONE)
+                               child_frame.method = (MonoMethod *)mono_method_get_wrapper_data (frame->method, token);
+                       else 
+                               child_frame.method = mono_get_method (image, token, NULL);
+                       if (!child_frame.method)
                                THROW_EX (mono_get_exception_missing_method (), ip -5);
 
                        csig = child_frame.method->signature;