diff options
Diffstat (limited to 'src/System.Private.TypeLoader/src/Internal/Reflection/Execution/AssemblyBinderImplementation.Ecma.cs')
-rw-r--r-- | src/System.Private.TypeLoader/src/Internal/Reflection/Execution/AssemblyBinderImplementation.Ecma.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/System.Private.TypeLoader/src/Internal/Reflection/Execution/AssemblyBinderImplementation.Ecma.cs b/src/System.Private.TypeLoader/src/Internal/Reflection/Execution/AssemblyBinderImplementation.Ecma.cs index c6342da01..444538f55 100644 --- a/src/System.Private.TypeLoader/src/Internal/Reflection/Execution/AssemblyBinderImplementation.Ecma.cs +++ b/src/System.Private.TypeLoader/src/Internal/Reflection/Execution/AssemblyBinderImplementation.Ecma.cs @@ -59,7 +59,7 @@ namespace Internal.Reflection.Execution lock(s_ecmaLoadedAssemblies) { // 3. Attempt to bind to already loaded assembly - if (Bind(runtimeAssemblyName, out bindResult, out exception)) + if (Bind(runtimeAssemblyName, cacheMissedLookups: false, out bindResult, out exception)) { result = true; return; @@ -75,7 +75,7 @@ namespace Internal.Reflection.Execution moduleList.RegisterModule(newModuleInfo); // 5. Then try to load by name again. This load should always succeed - if (Bind(runtimeAssemblyName, out bindResult, out exception)) + if (Bind(runtimeAssemblyName, cacheMissedLookups: true, out bindResult, out exception)) { result = true; return; @@ -86,7 +86,7 @@ namespace Internal.Reflection.Execution } } - partial void BindEcmaAssemblyName(RuntimeAssemblyName refName, ref AssemblyBindResult result, ref Exception exception, ref Exception preferredException, ref bool foundMatch) + partial void BindEcmaAssemblyName(RuntimeAssemblyName refName, bool cacheMissedLookups, ref AssemblyBindResult result, ref Exception exception, ref Exception preferredException, ref bool foundMatch) { lock(s_ecmaLoadedAssemblies) { @@ -186,7 +186,7 @@ namespace Internal.Reflection.Execution } // Cache missed lookups - if (!foundMatch) + if (cacheMissedLookups && !foundMatch) { PEInfo peinfo = new PEInfo(refName, null, null); s_ecmaLoadedAssemblies.Add(peinfo); |