Add in code to do NullArgumentChecks for compatibiity
authorVance Morrison <vancem@microsoft.com>
Mon, 22 Feb 2016 18:31:44 +0000 (10:31 -0800)
committerVance Morrison <vancem@microsoft.com>
Mon, 22 Feb 2016 18:31:44 +0000 (10:31 -0800)
Commit migrated from https://github.com/dotnet/coreclr/commit/d47f6dce43ce951e48c431a7ececd9e0c54cb925

src/coreclr/src/mscorlib/src/System/Reflection/Emit/DynamicMethod.cs

index 4e33cf2..ae39d3c 100644 (file)
@@ -438,10 +438,10 @@ namespace System.Reflection.Emit
         [System.Security.SecurityCritical]  // auto-generated
         private void PerformSecurityCheck(Module m, ref StackCrawlMark stackMark, bool skipVisibility)
         {
-#if !FEATURE_CORECLR
             if (m == null) 
                 throw new ArgumentNullException("m");
             Contract.EndContractBlock();
+#if !FEATURE_CORECLR
 
             RuntimeModule rtModule;
             ModuleBuilder mb = m as ModuleBuilder;
@@ -484,9 +484,9 @@ namespace System.Reflection.Emit
         [System.Security.SecurityCritical]  // auto-generated
         private void PerformSecurityCheck(Type owner, ref StackCrawlMark stackMark, bool skipVisibility)
         {
-#if !FEATURE_CORECLR
             if (owner == null)
                 throw new ArgumentNullException("owner");
+#if !FEATURE_CORECLR
 
             RuntimeType rtOwner = owner as RuntimeType;
             if (rtOwner == null)