Skip to content

Commit b2062d4

Browse files
committed
Make Module::GetPath assert that it matches the cached path
1 parent fd247d4 commit b2062d4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/coreclr/vm/ceeload.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,12 @@ class Module : public ModuleBase
13811381
}
13821382

13831383
HRESULT GetScopeName(LPCUTF8 * pszName) { WRAPPER_NO_CONTRACT; return m_pPEAssembly->GetScopeName(pszName); }
1384-
const SString &GetPath() { WRAPPER_NO_CONTRACT; return m_pPEAssembly->GetPath(); }
1384+
const SString &GetPath()
1385+
{
1386+
WRAPPER_NO_CONTRACT;
1387+
_ASSERTE(SString{m_path}.Equals(m_pPEAssembly->GetPath()));
1388+
return m_pPEAssembly->GetPath();
1389+
}
13851390

13861391
#ifdef LOGGING
13871392
LPCUTF8 GetDebugName() { WRAPPER_NO_CONTRACT; return m_pPEAssembly->GetDebugName(); }

0 commit comments

Comments
 (0)