summaryrefslogtreecommitdiff
path: root/src/vm/threads.cpp
diff options
context:
space:
mode:
authorJeremy Koritzinsky <jekoritz@microsoft.com>2019-05-24 13:20:23 -0700
committerGitHub <noreply@github.com>2019-05-24 13:20:23 -0700
commit73217c884caeca4bcfbb9cc93ffe4c90db79cf7a (patch)
tree45ee95e94186fab0fabe05bd1aa351567daa62ac /src/vm/threads.cpp
parent5894a0f4ecd7360dc25b1e01afb0120efceb7a11 (diff)
downloadcoreclr-73217c884caeca4bcfbb9cc93ffe4c90db79cf7a.tar.gz
coreclr-73217c884caeca4bcfbb9cc93ffe4c90db79cf7a.tar.bz2
coreclr-73217c884caeca4bcfbb9cc93ffe4c90db79cf7a.zip
Enable LCID marshalling and clean up our LCID marshalling tests. (#24642)
* Enable LCID marshalling and clean up our LCID marshalling tests. * Fix return type. * Enable LCID IDispatch reverse marshalling * Add more tests for LCID marshalling. * Add testing for reverse-IDispatch. Fix bug in Thread::GetCulture when culture has not been initialized on the managed side. * PR Feedback. * Fix install command.
Diffstat (limited to 'src/vm/threads.cpp')
-rw-r--r--src/vm/threads.cpp21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/vm/threads.cpp b/src/vm/threads.cpp
index 7632bda555..945cb3a601 100644
--- a/src/vm/threads.cpp
+++ b/src/vm/threads.cpp
@@ -7918,8 +7918,6 @@ OBJECTREF Thread::GetCulture(BOOL bUICulture)
}
CONTRACTL_END;
- FieldDesc * pFD;
-
// This is the case when we're building mscorlib and haven't yet created
// the system assembly.
if (SystemDomain::System()->SystemAssembly()==NULL || g_fForbidEnterEE) {
@@ -7927,22 +7925,9 @@ OBJECTREF Thread::GetCulture(BOOL bUICulture)
}
OBJECTREF pCurrentCulture;
- if (bUICulture) {
- // Call the Getter for the CurrentUICulture. This will cause it to populate the field.
- MethodDescCallSite propGet(METHOD__CULTURE_INFO__GET_CURRENT_UI_CULTURE);
- ARG_SLOT retVal = propGet.Call_RetArgSlot(NULL);
- pCurrentCulture = ArgSlotToObj(retVal);
- } else {
- //This is faster than calling the property, because this is what the call does anyway.
- pFD = MscorlibBinder::GetField(FIELD__CULTURE_INFO__CURRENT_CULTURE);
- _ASSERTE(pFD);
-
- pFD->CheckRunClassInitThrowing();
-
- pCurrentCulture = pFD->GetStaticOBJECTREF();
- _ASSERTE(pCurrentCulture!=NULL);
- }
-
+ MethodDescCallSite propGet(bUICulture ? METHOD__CULTURE_INFO__GET_CURRENT_UI_CULTURE : METHOD__CULTURE_INFO__GET_CURRENT_CULTURE);
+ ARG_SLOT retVal = propGet.Call_RetArgSlot(NULL);
+ pCurrentCulture = ArgSlotToObj(retVal);
return pCurrentCulture;
}