summaryrefslogtreecommitdiff
path: root/src/vm/assemblynative.cpp
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2019-02-26 23:46:00 +0100
committerGitHub <noreply@github.com>2019-02-26 23:46:00 +0100
commit19394b01ed59d3771c0602ec321ec4520bcd2aa2 (patch)
tree04c42703a3e23e4f7ca8798c96ab36fb38b7984d /src/vm/assemblynative.cpp
parent79341dcfaeb454d684e039e648f2a555f7da4bd0 (diff)
downloadcoreclr-19394b01ed59d3771c0602ec321ec4520bcd2aa2.tar.gz
coreclr-19394b01ed59d3771c0602ec321ec4520bcd2aa2.tar.bz2
coreclr-19394b01ed59d3771c0602ec321ec4520bcd2aa2.zip
Fix Assembly::Load context for collectible assemblies (#22494)
* Fix Assembly::Load context for collectible assemblies This change fixes a problem when Assembly::Load is called from an assembly in a collectible AssemblyLoadContext. In that case, we ended up loading it into the default context instead of the context of the calling assembly.
Diffstat (limited to 'src/vm/assemblynative.cpp')
-rw-r--r--src/vm/assemblynative.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/vm/assemblynative.cpp b/src/vm/assemblynative.cpp
index d0f1418fe4..30ee95b35f 100644
--- a/src/vm/assemblynative.cpp
+++ b/src/vm/assemblynative.cpp
@@ -83,9 +83,7 @@ FCIMPL6(Object*, AssemblyNative::Load, AssemblyNameBaseObject* assemblyNameUNSAF
pRefAssembly = gc.requestingAssembly->GetAssembly();
}
- // Shared or collectible assemblies should not be used for the parent in the
- // late-bound case.
- if (pRefAssembly && (!pRefAssembly->IsCollectible()))
+ if (pRefAssembly)
{
pParentAssembly= pRefAssembly->GetDomainAssembly();
}