[runtime] Use mono_assembly_get_object_handle instead of mono_assembly_get_object_checked everywhere in the runtime. (#4061)
* [runtime] Move domain icall declarations to appdomain-icalls.h
* [coop] Use handles for System.AppDomain.GetAssemblies icall
* [coop handles] Add HANDLE_FUNCTION_RETURN_REF macro
* [runtime] Handles for AppDomain.LoadAssemblyRaw and Assembly.LoadFrom
* [reflection] Coop handles for RuntimeTypeHandle.GetAssembly
* [runtime] Change mono_try_assembly_resolve to return MonoAssembly
instead of managed MonoReflectionAssembly. Update call sites.
Also implement it in terms of mono_try_assembly_resolve_handle (which
also returns MonoAssembly*, not a managed object)
* [runtime] Use handles for System.AppDomain.LoadAssembly
* [reflection] Use mono_assembly_get_object_handle instead of mono_assembly_get_object_checked
Convert all its callers to use handles and get rid of mono_assembly_get_object_checked
16 files changed: