diff options
author | Jan Kotas <jkotas@microsoft.com> | 2017-01-22 03:55:58 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2017-01-22 03:55:58 +0300 |
commit | 1af35426457484f64a95d417efb0f2d5492e2f51 (patch) | |
tree | 08d15fb67e44a1219a1b50954999808691622e69 /src/Native/Runtime/MiscHelpers.cpp | |
parent | 260087e69f27e06adc0e968982aa0769a0182f2f (diff) |
Abstract cctor trigger via ICodeManager
[tfs-changeset: 1645382]
Diffstat (limited to 'src/Native/Runtime/MiscHelpers.cpp')
-rw-r--r-- | src/Native/Runtime/MiscHelpers.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/Native/Runtime/MiscHelpers.cpp b/src/Native/Runtime/MiscHelpers.cpp index 9b6541f11..6eb25def8 100644 --- a/src/Native/Runtime/MiscHelpers.cpp +++ b/src/Native/Runtime/MiscHelpers.cpp @@ -203,17 +203,13 @@ COOP_PINVOKE_HELPER(Boolean, RhFindBlob, (HANDLE hOsModule, UInt32 blobId, UInt8 // to code in the caller's module and can be used in the lookup. COOP_PINVOKE_HELPER(void *, GetClasslibCCtorCheck, (void * pReturnAddress)) { - // Locate the calling module from the context structure address (which is in writeable memory in the + // Locate the calling module from the context structure address (which is in writable memory in the // module image). - Module * pModule = GetRuntimeInstance()->FindModuleByCodeAddress(pReturnAddress); - ASSERT(pModule); - - // Locate the classlib module from the calling module. - Module * pClasslibModule = pModule->GetClasslibModule(); - ASSERT(pClasslibModule); + ICodeManager * pCodeManager = GetRuntimeInstance()->FindCodeManagerByAddress(pReturnAddress); + ASSERT(pCodeManager); // Lookup the callback registered by the classlib. - void * pCallback = pClasslibModule->GetClasslibCheckStaticClassConstruction(); + void * pCallback = pCodeManager->GetClasslibFunction(ClasslibFunctionId::CheckStaticClassConstruction); // We have no fallback path if we got here but the classlib doesn't implement the callback. if (pCallback == NULL) |