Remove an assert in AssemblySpec::EmitToken
authorJohn Chen (CLR) <jochen@microsoft.com>
Thu, 5 May 2016 06:11:15 +0000 (23:11 -0700)
committerJohn Chen (CLR) <jochen@microsoft.com>
Thu, 5 May 2016 06:11:15 +0000 (23:11 -0700)
AssemblySpec::EmitToken has a PRECONDITION that prohibits emitting AssemblyRef
tokens to WinMD files, except inside CrossGen. However, there are scenarios,
such as XML serialization, that need to emit such tokens. Thus this PRECONDITION
is removed.

src/vm/assemblyspec.cpp

index b324645..634be16 100644 (file)
@@ -1551,7 +1551,6 @@ HRESULT AssemblySpec::EmitToken(
         NOTHROW;
         GC_NOTRIGGER;
         INJECT_FAULT(return E_OUTOFMEMORY;);
-        PRECONDITION(HasUniqueIdentity() || AppDomain::GetCurrentDomain()->IsCompilationDomain());
     }
     CONTRACTL_END;