From 294cf7c190dcb2ee5e139c078956c6576d78a613 Mon Sep 17 00:00:00 2001 From: Ryan Lucia Date: Mon, 22 Jul 2019 10:58:12 -0400 Subject: [PATCH] Miscellaneous loader-related fixes (mono/mono#15765) * 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 | 4 +--- src/mono/mono/metadata/loader-internals.h | 2 -- src/mono/mono/metadata/metadata-internals.h | 4 +--- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/mono/mono/metadata/assembly.c b/src/mono/mono/metadata/assembly.c index 4bc12f4..ac1aa3e 100644 --- a/src/mono/mono/metadata/assembly.c +++ b/src/mono/mono/metadata/assembly.c @@ -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; diff --git a/src/mono/mono/metadata/loader-internals.h b/src/mono/mono/metadata/loader-internals.h index b2873e4..de7f2aa 100644 --- a/src/mono/mono/metadata/loader-internals.h +++ b/src/mono/mono/metadata/loader-internals.h @@ -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); diff --git a/src/mono/mono/metadata/metadata-internals.h b/src/mono/mono/metadata/metadata-internals.h index 9a6036f..7a842f8 100644 --- a/src/mono/mono/metadata/metadata-internals.h +++ b/src/mono/mono/metadata/metadata-internals.h @@ -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__ */ -- 2.7.4