Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRodrigo Kumpera <kumpera@gmail.com>2015-11-06 07:04:54 +0300
committerRodrigo Kumpera <kumpera@gmail.com>2016-01-27 00:07:39 +0300
commit36a9877998a15fe106e277e9e44e7af1b2b67e43 (patch)
tree58356d1370f5aa9b37119645e58fd6686da9063c
parenta8b276ed8c76125cdd282bb5bdefe89d3a51f579 (diff)
[mono-error] Remove loader-error conversion for 3 functions that are not longer called by the runtime.
The following legacy functions are no longer used by the runtime and don't need loader-error conversion: mono_method_get_signature_full mono_method_get_signature mono_field_from_token May all that is unholy smite upon those attempting to use those functions again.
-rw-r--r--mono/metadata/loader.c32
1 files changed, 11 insertions, 21 deletions
diff --git a/mono/metadata/loader.c b/mono/metadata/loader.c
index 0566fe2d102..55a02988f30 100644
--- a/mono/metadata/loader.c
+++ b/mono/metadata/loader.c
@@ -534,17 +534,14 @@ field_from_memberref (MonoImage *image, guint32 token, MonoClass **retklass,
/*
* mono_field_from_token:
* @deprecated use the _checked variant
+ * Notes: runtime code MUST not use this function
*/
MonoClassField*
mono_field_from_token (MonoImage *image, guint32 token, MonoClass **retklass, MonoGenericContext *context)
{
MonoError error;
MonoClassField *res = mono_field_from_token_checked (image, token, retklass, context, &error);
- mono_loader_assert_no_error ();
- if (!mono_error_ok (&error)) {
- mono_loader_set_error_from_mono_error (&error);
- mono_error_cleanup (&error);
- }
+ g_assert (mono_error_ok (&error));
return res;
}
@@ -899,20 +896,15 @@ inflate_generic_header (MonoMethodHeader *header, MonoGenericContext *context)
/*
* token is the method_ref/def/spec token used in a call IL instruction.
+ * @deprecated use the _checked variant
+ * Notes: runtime code MUST not use this function
*/
MonoMethodSignature*
mono_method_get_signature_full (MonoMethod *method, MonoImage *image, guint32 token, MonoGenericContext *context)
{
MonoError error;
MonoMethodSignature *res = mono_method_get_signature_checked (method, image, token, context, &error);
-
- mono_loader_assert_no_error ();
-
- if (!res) {
- g_assert (!mono_error_ok (&error));
- mono_loader_set_error_from_mono_error (&error);
- mono_error_cleanup (&error); /* FIXME Don't swallow the error */
- }
+ g_assert (mono_error_ok (&error));
return res;
}
@@ -1001,19 +993,17 @@ mono_method_get_signature_checked (MonoMethod *method, MonoImage *image, guint32
return sig;
}
+/*
+ * token is the method_ref/def/spec token used in a call IL instruction.
+ * @deprecated use the _checked variant
+ * Notes: runtime code MUST not use this function
+ */
MonoMethodSignature*
mono_method_get_signature (MonoMethod *method, MonoImage *image, guint32 token)
{
MonoError error;
MonoMethodSignature *res = mono_method_get_signature_checked (method, image, token, NULL, &error);
-
- mono_loader_assert_no_error ();
-
- if (!res) {
- g_assert (!mono_error_ok (&error));
- mono_loader_set_error_from_mono_error (&error);
- mono_error_cleanup (&error); /* FIXME Don't swallow the error */
- }
+ g_assert (mono_error_ok (&error));
return res;
}