diff options
author | Rahul Kumar <rahku@microsoft.com> | 2017-02-22 16:54:48 -0800 |
---|---|---|
committer | Rahul Kumar <rahku@microsoft.com> | 2017-03-09 10:57:07 -0800 |
commit | 3ac0d28ef7b707c026f7ca2a709b248899b186d9 (patch) | |
tree | 6e72d75177d454555ecc45e50d7fd20e7c15cac6 /src/vm/assemblyspec.cpp | |
parent | 3b36244d78c244b137205b8e81be7346600e7c81 (diff) | |
download | coreclr-3ac0d28ef7b707c026f7ca2a709b248899b186d9.tar.gz coreclr-3ac0d28ef7b707c026f7ca2a709b248899b186d9.tar.bz2 coreclr-3ac0d28ef7b707c026f7ca2a709b248899b186d9.zip |
Ignore binder context for corelib when performing binding cache lookup
Diffstat (limited to 'src/vm/assemblyspec.cpp')
-rw-r--r-- | src/vm/assemblyspec.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vm/assemblyspec.cpp b/src/vm/assemblyspec.cpp index b969e8d563..e278c002fc 100644 --- a/src/vm/assemblyspec.cpp +++ b/src/vm/assemblyspec.cpp @@ -1276,7 +1276,14 @@ AssemblySpecBindingCache::AssemblyBinding* AssemblySpecBindingCache::GetAssembly // Check if the AssemblySpec already has specified its binding context. This will be set for assemblies that are // attempted to be explicitly bound using AssemblyLoadContext LoadFrom* methods. - pBinderContextForLookup = pSpec->GetBindingContext(); + if(!pSpec->IsAssemblySpecForMscorlib()) + pBinderContextForLookup = pSpec->GetBindingContext(); + else + { + // For System.Private.Corelib Binding context is either not set or if set then it should be TPA + _ASSERTE(pSpec->GetBindingContext() == NULL || pSpec->GetBindingContext() == pSpecDomain->GetFusionContext()); + } + if (pBinderContextForLookup != NULL) { // We are working with the actual binding context in which the assembly was expected to be loaded. |