Miscellaneous loader-related fixes (mono/mono#15765)
authorRyan Lucia <rylucia@microsoft.com>
Mon, 22 Jul 2019 14:58:12 +0000 (10:58 -0400)
committerGitHub <noreply@github.com>
Mon, 22 Jul 2019 14:58:12 +0000 (10:58 -0400)
* Clarify contents of list

* Fix mono_assembly_get_alc

* Remove pointless ifdef

* Prepend to domain_assemblies

* Revert "Prepend to domain_assemblies"

This reverts commit mono/mono@dbe6e47b80470fa13d22d97d32721d18c4764597.

* Ditch another ifdef

Commit migrated from https://github.com/mono/mono/commit/54f608d08dd6163a7c4a7d48c0e3cb74cb2f7bcd

src/mono/mono/metadata/assembly.c
src/mono/mono/metadata/loader-internals.h
src/mono/mono/metadata/metadata-internals.h

index 4bc12f4..ac1aa3e 100644 (file)
@@ -349,9 +349,7 @@ static const AssemblyVersionMap framework_assemblies [] = {
 };
 #endif
 
-/*
- * keeps track of loaded assemblies
- */
+/* keeps track of loaded assemblies, excluding dynamic ones */
 static GList *loaded_assemblies = NULL;
 static MonoAssembly *corlib;
 
index b2873e4..de7f2aa 100644 (file)
@@ -31,9 +31,7 @@ mono_lookup_pinvoke_call_internal (MonoMethod *method, MonoError *error);
 #ifdef ENABLE_NETCORE
 void
 mono_set_pinvoke_search_directories (int dir_count, char **dirs);
-#endif
 
-#ifdef ENABLE_NETCORE
 void
 mono_alc_init (MonoAssemblyLoadContext *alc, MonoDomain *domain);
 
index 9a6036f..7a842f8 100644 (file)
@@ -1195,13 +1195,11 @@ mono_image_get_alc (MonoImage *image)
 #endif
 }
 
-#ifdef ENABLE_NETCORE
 static inline
 MonoAssemblyLoadContext *
 mono_assembly_get_alc (MonoAssembly *assm)
 {
-       return assm->image->alc;
+       return mono_image_get_alc (assm->image);
 }
-#endif
 
 #endif /* __MONO_METADATA_INTERNALS_H__ */