Add StackCrawl reference marker to each of the Assembly.Load implementations.
authorGaurav Khanna <gkhanna@microsoft.com>
Wed, 10 Aug 2016 16:26:04 +0000 (09:26 -0700)
committerGaurav Khanna <gkhanna@microsoft.com>
Wed, 10 Aug 2016 16:26:04 +0000 (09:26 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/0958f8bc5ecbacecf5d6e1f6c3de59b397f3e26f

src/coreclr/src/mscorlib/src/System/Reflection/Assembly.cs

index 62ae9b4..daf5b9e 100644 (file)
@@ -327,7 +327,15 @@ namespace System.Reflection
             Contract.Ensures(Contract.Result<Assembly>() != null);
             Contract.Ensures(!Contract.Result<Assembly>().ReflectionOnly);
 
-            return Load(assemblyRef, IntPtr.Zero);
+#if FEATURE_WINDOWSPHONE
+            if (assemblyRef != null && assemblyRef.CodeBase != null)
+            {
+                throw new NotSupportedException(Environment.GetResourceString("NotSupported_AssemblyLoadCodeBase"));
+            }
+#endif
+
+            StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
+            return RuntimeAssembly.InternalLoadAssemblyName(assemblyRef, null, null, ref stackMark, true /*thrownOnFileNotFound*/, false /*forIntrospection*/, false /*suppressSecurityChecks*/);
         }
 
         // Locate an assembly by its name. The name can be strong or