Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions src/coreclr/debug/di/divalue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2691,22 +2691,22 @@ HRESULT CordbObjectValue::GetFunctionHelper(ICorDebugFunction **ppFunction)
if (hr != S_OK)
return hr;

mdMethodDef functionMethodDef = 0;
VMPTR_DomainAssembly functionDomainAssembly;
NativeCodeFunctionData nativeCodeForDelFunc;

hr = pDAC->GetDelegateFunctionData(delType, pDelegateObj, &functionDomainAssembly, &functionMethodDef);
if (hr != S_OK)
return hr;

// TODO: How to ensure results are sanitized?
// Also, this is expensive. Do we really care that much about this?
pDAC->GetNativeCodeInfo(functionDomainAssembly, functionMethodDef, &nativeCodeForDelFunc);

RSSmartPtr<CordbModule> funcModule(GetProcess()->LookupOrCreateModule(functionDomainAssembly));
RSSmartPtr<CordbFunction> func;
{
RSLockHolder lockHolder(GetProcess()->GetProcessLock());

VMPTR_DomainAssembly functionDomainAssembly;
mdMethodDef functionMethodDef = 0;
hr = pDAC->GetDelegateFunctionData(delType, pDelegateObj, &functionDomainAssembly, &functionMethodDef);
if (hr != S_OK)
return hr;

// TODO: How to ensure results are sanitized?
// Also, this is expensive. Do we really care that much about this?
NativeCodeFunctionData nativeCodeForDelFunc;
pDAC->GetNativeCodeInfo(functionDomainAssembly, functionMethodDef, &nativeCodeForDelFunc);

RSSmartPtr<CordbModule> funcModule(GetProcess()->LookupOrCreateModule(functionDomainAssembly));
func.Assign(funcModule->LookupOrCreateFunction(functionMethodDef, nativeCodeForDelFunc.encVersion));
}

Expand Down