summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Baladurin <k.baladurin@samsung.com>2019-02-11 13:11:09 (GMT)
committerAlexander Soldatov/AI Ecosystem Lab /SRR/Staff Engineer/삼성전자 <soldatov.a@samsung.com>2019-02-14 17:24:48 (GMT)
commit1eec27203122b4deb3ce4f28f2dde37124f05e10 (patch)
tree86f20161c191b385efd50ba51ce70d5fd27ec159
parent201263c27e970e9d2e50c6bccdc82ecdab2893e0 (diff)
downloadcoreclr-1eec27203122b4deb3ce4f28f2dde37124f05e10.zip
coreclr-1eec27203122b4deb3ce4f28f2dde37124f05e10.tar.gz
coreclr-1eec27203122b4deb3ce4f28f2dde37124f05e10.tar.bz2
Use DispatchToken::CreateDispatchToken to get token to resolve virtual method in case of non interface MT.
-rw-r--r--src/vm/prestub.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vm/prestub.cpp b/src/vm/prestub.cpp
index 5c08bec..c068893 100644
--- a/src/vm/prestub.cpp
+++ b/src/vm/prestub.cpp
@@ -2356,7 +2356,11 @@ EXTERN_C PCODE STDCALL ExternalMethodFixupWorker(TransitionBlock * pTransitionBl
DispatchToken token;
if (pMT->IsInterface() || MethodTable::VTableIndir_t::isRelative)
{
- token = pMT->GetLoaderAllocator()->GetDispatchToken(pMT->GetTypeID(), slot);
+ if (pMT->IsInterface())
+ token = pMT->GetLoaderAllocator()->GetDispatchToken(pMT->GetTypeID(), slot);
+ else
+ token = DispatchToken::CreateDispatchToken(slot);
+
StubCallSite callSite(pIndirection, pEMFrame->GetReturnAddress());
pCode = pMgr->ResolveWorker(&callSite, protectedObj, token, VirtualCallStubManager::SK_LOOKUP);
}