[runtime] Use coop handles for System.RuntimeMethodHandle.GetFunctionPointer
authorAleksey Kliger <aleksey@xamarin.com>
Wed, 3 May 2017 18:53:15 +0000 (14:53 -0400)
committerAleksey Kliger <aleksey@xamarin.com>
Wed, 10 May 2017 15:14:00 +0000 (11:14 -0400)
mono/metadata/icall-def.h
mono/metadata/icall.c

index 81372e12baaa8d2f42942c8ce5b39daaa870f860..a9214eb86c55d83132b6222ebd45f44c3c1bc7a8 100644 (file)
@@ -766,7 +766,7 @@ ICALL(RFH_1, "SetValueDirect", ves_icall_System_RuntimeFieldHandle_SetValueDirec
 ICALL(RFH_2, "SetValueInternal", ves_icall_MonoField_SetValueInternal)
 
 ICALL_TYPE(MHAN, "System.RuntimeMethodHandle", MHAN_1)
-ICALL(MHAN_1, "GetFunctionPointer", ves_icall_RuntimeMethodHandle_GetFunctionPointer)
+HANDLES(ICALL(MHAN_1, "GetFunctionPointer", ves_icall_RuntimeMethodHandle_GetFunctionPointer))
 
 ICALL_TYPE(RT, "System.RuntimeType", RT_1)
 HANDLES(ICALL(RT_1, "CreateInstanceInternal", ves_icall_System_Activator_CreateInstanceInternal))
index fad74732cf483c9b49a1fb0f7e403f2c84d9a928..ed071dd099555683c2851f00500137b4fdad6973 100644 (file)
@@ -7091,12 +7091,10 @@ ves_icall_System_IO_DriveInfo_GetDriveType (MonoString *root_path_name)
 #endif /* PLATFORM_NO_DRIVEINFO */
 
 ICALL_EXPORT gpointer
-ves_icall_RuntimeMethodHandle_GetFunctionPointer (MonoMethod *method)
+ves_icall_RuntimeMethodHandle_GetFunctionPointer (MonoMethod *method, MonoError *error)
 {
-       MonoError error;
-       gpointer result = mono_compile_method_checked (method, &error);
-       mono_error_set_pending_exception (&error);
-       return result;
+       error_init (error);
+       return mono_compile_method_checked (method, error);
 }
 
 ICALL_EXPORT MonoStringHandle