Skip to content

Commit

Permalink
Fix GetILFunctionBody for dynamic methods (#87530)
Browse files Browse the repository at this point in the history
  • Loading branch information
davmason authored Jun 14, 2023
1 parent 350290c commit e082cc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/coreclr/vm/proftoeeinterfaceimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4337,7 +4337,7 @@ HRESULT ProfToEEInterfaceImpl::GetILFunctionBody(ModuleID moduleId,

PEAssembly *pPEAssembly = pModule->GetPEAssembly();

if (!pPEAssembly->HasLoadedPEImage())
if (!pPEAssembly->IsLoaded())
return (CORPROF_E_DATAINCOMPLETE);

LPCBYTE pbMethod = NULL;
Expand Down Expand Up @@ -4447,7 +4447,7 @@ HRESULT ProfToEEInterfaceImpl::GetILFunctionBodyAllocator(ModuleID modul
Module * pModule = (Module *) moduleId;

if (pModule->IsBeingUnloaded() ||
!pModule->GetPEAssembly()->HasLoadedPEImage())
!pModule->GetPEAssembly()->IsLoaded())
{
return (CORPROF_E_DATAINCOMPLETE);
}
Expand Down

0 comments on commit e082cc6

Please sign in to comment.