* Changes which are already detected at runtime, like the addition
* of icalls, do not require an increment.
*/
-#define MONO_CORLIB_VERSION 76
+#define MONO_CORLIB_VERSION 82
typedef struct
{
data->domain = ad;
data->setup = setup;
data->friendly_name = g_strdup (friendly_name);
- // FIXME: The ctor runs in the current domain
- // FIXME: Initialize null_reference_ex and stack_overflow_ex
- data->out_of_memory_ex = mono_exception_from_name_domain (data, mono_defaults.corlib, "System", "OutOfMemoryException");
if (!setup->application_base) {
/* Inherit from the root domain since MS.NET does this */
mono_debugger_event_create_appdomain (data, shadow_location);
g_free (shadow_location);
#endif
-
+
+ // FIXME: Initialize null_reference_ex and stack_overflow_ex
+ data->out_of_memory_ex = mono_exception_from_name_domain (data, mono_defaults.corlib, "System", "OutOfMemoryException");
+
return ad;
}
MonoBoolean isrefonly;
gpointer params [2];
+ if (mono_runtime_get_no_exec ())
+ return NULL;
+
g_assert (domain != NULL && fname != NULL);
klass = domain->domain->mbr.obj.vtable->klass;
g_hash_table_foreach (value, deregister_reflection_info_roots_nspace_table, user_data);
}
+static void
+deregister_reflection_info_roots_from_list (MonoImage *image)
+{
+ GSList *list = image->reflection_info_unregister_classes;
+
+ while (list) {
+ MonoClass *class = list->data;
+
+ g_assert (class->reflection_info);
+ mono_gc_deregister_root ((char*) &class->reflection_info);
+
+ list = list->next;
+ }
+
+ g_slist_free (image->reflection_info_unregister_classes);
+ image->reflection_info_unregister_classes = NULL;
+}
+
static void
deregister_reflection_info_roots (MonoDomain *domain)
{
MonoAssembly *assembly = list->data;
MonoImage *image = assembly->image;
int i;
-
+ /*No need to take the image lock here since dynamic images are appdomain bound and at this point the mutator is gone.*/
if (image->dynamic && image->name_cache)
g_hash_table_foreach (image->name_cache, deregister_reflection_info_roots_name_space, image);
+ deregister_reflection_info_roots_from_list (image);
for (i = 0; i < image->module_count; ++i) {
MonoImage *module = image->modules [i];
- if (module && module->dynamic && module->name_cache)
- g_hash_table_foreach (module->name_cache, deregister_reflection_info_roots_name_space, module);
+ if (module) {
+ if (module->dynamic && module->name_cache) {
+ g_hash_table_foreach (module->name_cache,
+ deregister_reflection_info_roots_name_space, module);
+ }
+ deregister_reflection_info_roots_from_list (module);
+ }
}
}
mono_domain_assemblies_unlock (domain);