// manager's active IL version hasn't yet asked the profiler for the IL body to use, in which case we want to filter it
// out from the return in this method.
ILCodeVersion activeILVersion = pCodeVersionManager->GetActiveILCodeVersion(pModule, methodTk);
- if (activeILVersion.IsNull() || activeILVersion.GetRejitState() != ILCodeVersion::kStateActive)
+ if (activeILVersion.IsNull() || activeILVersion.IsDefaultVersion() || activeILVersion.GetRejitState() != ILCodeVersion::kStateActive)
{
pVmILCodeVersionNode->SetDacTargetPtr(0);
}
ILCodeVersionNode* ILCodeVersion::AsNode()
{
LIMITED_METHOD_CONTRACT;
+ //This is dangerous - NativeCodeVersion coerces non-explicit versions to NULL but ILCodeVersion assumes the caller
+ //will never invoke AsNode() on a non-explicit node. Asserting for now as a minimal fix, but we should revisit this.
+ _ASSERTE(m_storageKind == StorageKind::Explicit);
return m_pVersionNode;
}
#endif //DACCESS_COMPILE
PTR_ILCodeVersionNode ILCodeVersion::AsNode() const
{
LIMITED_METHOD_DAC_CONTRACT;
+ //This is dangerous - NativeCodeVersion coerces non-explicit versions to NULL but ILCodeVersion assumes the caller
+ //will never invoke AsNode() on a non-explicit node. Asserting for now as a minimal fix, but we should revisit this.
+ _ASSERTE(m_storageKind == StorageKind::Explicit);
return m_pVersionNode;
}