Skip to content

Commit 2f7052b

Browse files
author
Josh Peterson
committed
Use the proper icall syntax for new Mono
1 parent e4495a6 commit 2f7052b

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

mono/metadata/exception.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1537,6 +1537,6 @@ mono_error_convert_to_exception_handle (MonoError *error)
15371537
void
15381538
ves_icall_System_Exception_ReportUnhandledException(MonoObject *exc)
15391539
{
1540-
mono_unhandled_exception (exc);
1540+
mono_unhandled_exception_internal (exc);
15411541
mono_invoke_unhandled_exception_hook (exc);
15421542
}

mono/metadata/icall-def.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,10 @@ HANDLES(ENV_17, "internalGetEnvironmentVariable_native", ves_icall_System_Enviro
343343
HANDLES(ENV_18, "internalGetGacPath", ves_icall_System_Environment_GetGacPath, MonoString, 0, ())
344344
HANDLES(ENV_19, "internalGetHome", ves_icall_System_Environment_InternalGetHome, MonoString, 0, ())
345345
NOHANDLES(ICALL(ENV_20, "set_ExitCode", mono_environment_exitcode_set))
346+
347+
ICALL_TYPE(EXCEPTION, "System.Exception", EXCEPTION_1)
348+
NOHANDLES(ICALL(EXCEPTION_1, "ReportUnhandledException", ves_icall_System_Exception_ReportUnhandledException))
349+
346350
ICALL_TYPE(GC, "System.GC", GC_10)
347351
NOHANDLES(ICALL(GC_10, "GetAllocatedBytesForCurrentThread", ves_icall_System_GC_GetAllocatedBytesForCurrentThread))
348352
NOHANDLES(ICALL(GC_0, "GetCollectionCount", ves_icall_System_GC_GetCollectionCount))
@@ -357,9 +361,6 @@ HANDLES(GC_7, "_SuppressFinalize", ves_icall_System_GC_SuppressFinalize, void, 1
357361
HANDLES(GC_9, "get_ephemeron_tombstone", ves_icall_System_GC_get_ephemeron_tombstone, MonoObject, 0, ())
358362
HANDLES(GC_8, "register_ephemeron_array", ves_icall_System_GC_register_ephemeron_array, void, 1, (MonoObject))
359363

360-
ICALL_TYPE(EXCEPTION, "System.Exception", EXCEPTION_1)
361-
HANDLES(ICALL(EXCEPTION_1, "ReportUnhandledException", ves_icall_System_Exception_ReportUnhandledException))
362-
363364
ICALL_TYPE(CALDATA, "System.Globalization.CalendarData", CALDATA_1)
364365
HANDLES(CALDATA_1, "fill_calendar_data", ves_icall_System_Globalization_CalendarData_fill_calendar_data, MonoBoolean, 3, (MonoCalendarData, MonoString, gint32))
365366

@@ -1035,8 +1036,8 @@ NOHANDLES(ICALL(NATIVEC_4, "ResetEvent_internal", ves_icall_System_Threading_Ev
10351036
NOHANDLES(ICALL(NATIVEC_5, "SetEvent_internal", ves_icall_System_Threading_Events_SetEvent_internal))
10361037

10371038
ICALL_TYPE(OSSYNCCONTEXT, "System.Threading.OSSpecificSynchronizationContext", OSSYNCCONTEXT_1)
1038-
HANDLES(ICALL(OSSYNCCONTEXT_1, "GetOSContext", ves_icall_System_Threading_OSSpecificSynchronizationContext_GetOSContext))
1039-
ICALL(OSSYNCCONTEXT_2, "PostInternal", ves_icall_System_Threading_OSSpecificSynchronizationContext_PostInternal)
1039+
NOHANDLES(ICALL(OSSYNCCONTEXT_1, "GetOSContext", ves_icall_System_Threading_OSSpecificSynchronizationContext_GetOSContext))
1040+
NOHANDLES(ICALL(OSSYNCCONTEXT_2, "PostInternal", ves_icall_System_Threading_OSSpecificSynchronizationContext_PostInternal))
10401041

10411042
ICALL_TYPE(SEMA, "System.Threading.Semaphore", SEMA_1)
10421043
NOHANDLES(ICALL(SEMA_1, "CreateSemaphore_icall", ves_icall_System_Threading_Semaphore_CreateSemaphore_icall))

mono/metadata/icall.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9861,5 +9861,5 @@ void
98619861
ves_icall_System_Threading_OSSpecificSynchronizationContext_PostInternal (gpointer callback, gpointer arg)
98629862
{
98639863
/* This isn't actually reachable since ves_icall_System_Threading_OSSpecificSynchronizationContext_GetOSContext always returns NULL */
9864-
mono_set_pending_exception (mono_get_exception_not_implemented ("System.Threading.InteropServices.OSSpecificSynchronizationContext.PostInternal internal call is not implemented."));
9864+
mono_set_pending_exception (mono_exception_from_name_msg (mono_get_corlib (), "System", "NotImplementedException", "System.Threading.InteropServices.OSSpecificSynchronizationContext.PostInternal internal call is not implemented."));
98659865
}

0 commit comments

Comments
 (0)