[locales] Use coop handles for System.Text.Normalization.load_normalization_resource
authorAleksey Kliger <aleksey@xamarin.com>
Fri, 28 Apr 2017 19:14:35 +0000 (15:14 -0400)
committerAleksey Kliger <aleksey@xamarin.com>
Wed, 10 May 2017 15:13:59 +0000 (11:13 -0400)
mono/metadata/icall-def.h
mono/metadata/locales.c
mono/metadata/locales.h

index 0a532d9e4123af9695f68bbd4b5476a146b0c732..242fb35d7f50a2bcb54ab485b8db4cd0cf09d9e9 100644 (file)
@@ -872,7 +872,7 @@ ICALL_TYPE(TENC, "System.Text.EncodingHelper", TENC_1)
 HANDLES(ICALL(TENC_1, "InternalCodePage", ves_icall_System_Text_EncodingHelper_InternalCodePage))
 
 ICALL_TYPE(UNORM, "System.Text.Normalization", UNORM_1)
-ICALL(UNORM_1, "load_normalization_resource", ves_icall_System_Text_Normalization_load_normalization_resource)
+HANDLES(ICALL(UNORM_1, "load_normalization_resource", ves_icall_System_Text_Normalization_load_normalization_resource))
 
 ICALL_TYPE(ILOCK, "System.Threading.Interlocked", ILOCK_1)
 ICALL(ILOCK_1, "Add(int&,int)", ves_icall_System_Threading_Interlocked_Add_Int)
index 205fae8f031919017fbbdc109f1f41edd5c8d230..b0e6135f49a931befbff87178a53a3be7e93953a 100644 (file)
@@ -966,14 +966,16 @@ static gint32 string_invariant_indexof_char (MonoString *source, gint32 sindex,
 }
 
 void ves_icall_System_Text_Normalization_load_normalization_resource (guint8 **argProps,
-                                                                                                                                         guint8 **argMappedChars,
-                                                                                                                                         guint8 **argCharMapIndex,
-                                                                                                                                         guint8 **argHelperIndex,
-                                                                                                                                         guint8 **argMapIdxToComposite,
-                                                                                                                                         guint8 **argCombiningClass)
+                                                                     guint8 **argMappedChars,
+                                                                     guint8 **argCharMapIndex,
+                                                                     guint8 **argHelperIndex,
+                                                                     guint8 **argMapIdxToComposite,
+                                                                     guint8 **argCombiningClass,
+                                                                     MonoError *error)
 {
+       error_init (error);
 #ifdef DISABLE_NORMALIZATION
-       mono_set_pending_exception (mono_get_exception_not_supported ("This runtime has been compiled without string normalization support."));
+       mono_error_set_not_supported (error, "This runtime has been compiled without string normalization support.");
        return;
 #else
        *argProps = (guint8*)props;
index 6987aa316167888695fc6423e8bedaab999854bc..0faee51a1587af83ee382cbfd5e555d9be88e8e5 100644 (file)
@@ -51,6 +51,6 @@ extern MonoString *ves_icall_System_String_InternalToLower_Comp (MonoString *thi
 extern MonoString *ves_icall_System_String_InternalToUpper_Comp (MonoString *this_obj, MonoCultureInfo *cult);
 extern gunichar2 ves_icall_System_Char_InternalToUpper_Comp (gunichar2 c, MonoCultureInfo *cult);
 extern gunichar2 ves_icall_System_Char_InternalToLower_Comp (gunichar2 c, MonoCultureInfo *cult);
-extern void ves_icall_System_Text_Normalization_load_normalization_resource (guint8 **argProps, guint8** argMappedChars, guint8** argCharMapIndex, guint8** argHelperIndex, guint8** argMapIdxToComposite, guint8** argCombiningClass);
+extern void ves_icall_System_Text_Normalization_load_normalization_resource (guint8 **argProps, guint8** argMappedChars, guint8** argCharMapIndex, guint8** argHelperIndex, guint8** argMapIdxToComposite, guint8** argCombiningClass, MonoError *error);
 
 #endif /* _MONO_METADATA_FILEIO_H_ */