* Copyright 2001-2003 Ximian, Inc (http://www.ximian.com)
* Copyright 2004-2009 Novell, Inc (http://www.novell.com)
* Copyright 2011-2015 Xamarin Inc (http://www.xamarin.com).
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
#include <config.h>
return NULL;
}
- if (mono_security_core_clr_enabled ())
- mono_security_core_clr_ensure_reflection_access_field (cf);
+ if (mono_security_core_clr_enabled () &&
+ !mono_security_core_clr_ensure_reflection_access_field (cf, &error)) {
+ mono_error_set_pending_exception (&error);
+ return NULL;
+ }
MonoObject * result = mono_field_get_value_object_checked (domain, cf, obj, &error);
mono_error_set_pending_exception (&error);
return;
}
- if (mono_security_core_clr_enabled ())
- mono_security_core_clr_ensure_reflection_access_field (cf);
+ if (mono_security_core_clr_enabled () &&
+ !mono_security_core_clr_ensure_reflection_access_field (cf, &error)) {
+ mono_error_set_pending_exception (&error);
+ return;
+ }
type = mono_field_get_type_checked (cf, &error);
if (!mono_error_ok (&error)) {
*exc = NULL;
- if (mono_security_core_clr_enabled ())
- mono_security_core_clr_ensure_reflection_access_method (m);
+ if (mono_security_core_clr_enabled () &&
+ !mono_security_core_clr_ensure_reflection_access_method (m, &error)) {
+ mono_error_set_pending_exception (&error);
+ return NULL;
+ }
if (!(m->flags & METHOD_ATTRIBUTE_STATIC)) {
if (!mono_class_vtable_full (mono_object_domain (method), m->klass, &error)) {
}
if (mono_security_core_clr_enabled ()) {
- if (!mono_security_core_clr_ensure_delegate_creation (method, throwOnBindFailure))
+ if (!mono_security_core_clr_ensure_delegate_creation (method, &error)) {
+ if (throwOnBindFailure)
+ mono_error_set_pending_exception (&error);
+ else
+ mono_error_cleanup (&error);
return NULL;
+ }
}
delegate = mono_object_new_checked (mono_object_domain (type), delegate_class, &error);
return message;
}
-ICALL_EXPORT int
-ves_icall_System_StackFrame_GetILOffsetFromFile (MonoString *path, guint32 method_token, guint32 method_index, int native_offset)
-{
- guint32 il_offset;
- char *path_str = mono_string_to_utf8 (path);
-
- if (!mono_seq_point_data_get_il_offset (path_str, method_token, method_index, native_offset, &il_offset))
- il_offset = -1;
-
- g_free (path_str);
-
- return il_offset;
-}
-
ICALL_EXPORT gpointer
ves_icall_Microsoft_Win32_NativeMethods_GetCurrentProcess (void)
{