summaryrefslogtreecommitdiff
path: root/src/vm/assemblyspec.cpp
diff options
context:
space:
mode:
authorGaurav Khanna <gkhanna@microsoft.com>2017-02-03 15:43:15 -0800
committerGaurav Khanna <gkhanna@microsoft.com>2017-02-03 15:43:15 -0800
commit04c698ec434618ee2a0cef36be9b1829355dc64e (patch)
tree58711f64831cfd6f3132e94178fd57280372dcf9 /src/vm/assemblyspec.cpp
parent4fe623c9235e4df42be810d09ca7f282956e3cec (diff)
downloadcoreclr-04c698ec434618ee2a0cef36be9b1829355dc64e.tar.gz
coreclr-04c698ec434618ee2a0cef36be9b1829355dc64e.tar.bz2
coreclr-04c698ec434618ee2a0cef36be9b1829355dc64e.zip
Use fallback load context as binding context for dynamic parent assembly
Diffstat (limited to 'src/vm/assemblyspec.cpp')
-rw-r--r--src/vm/assemblyspec.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vm/assemblyspec.cpp b/src/vm/assemblyspec.cpp
index 2b4b1fb480..b9e94e8a81 100644
--- a/src/vm/assemblyspec.cpp
+++ b/src/vm/assemblyspec.cpp
@@ -1256,6 +1256,15 @@ ICLRPrivBinder* AssemblySpec::GetBindingContextFromParentAssembly(AppDomain *pDo
// ICLRPrivAssembly implements ICLRPrivBinder and thus, "is a" binder in a manner of semantics.
pParentAssemblyBinder = pParentPEAssembly->GetBindingContext();
+ if (pParentAssemblyBinder == NULL)
+ {
+ if (pParentPEAssembly->IsDynamic())
+ {
+ // If the parent assembly is dynamically generated, then use its fallback load context
+ // as the binder.
+ pParentAssemblyBinder = pParentPEAssembly->GetFallbackLoadContextBinder();
+ }
+ }
}
#if defined(FEATURE_HOST_ASSEMBLY_RESOLVER)