diff options
author | Steve MacLean <stmaclea@microsoft.com> | 2018-12-03 12:49:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-03 12:49:31 -0500 |
commit | 411f9787617f6bdc64c8393a51ac3b7a0d6e35f4 (patch) | |
tree | 618cf332ea7a4daf5feb802b4672a19bdd84a16b /src/vm/mlinfo.cpp | |
parent | f54494af07aec0d927962846eb4394c118a2fef8 (diff) | |
download | coreclr-411f9787617f6bdc64c8393a51ac3b7a0d6e35f4.tar.gz coreclr-411f9787617f6bdc64c8393a51ac3b7a0d6e35f4.tar.bz2 coreclr-411f9787617f6bdc64c8393a51ac3b7a0d6e35f4.zip |
Remove IsNeutralDomain() (#21318)
* Remove IsNeutralDomain()
* PR feedback
Diffstat (limited to 'src/vm/mlinfo.cpp')
-rw-r--r-- | src/vm/mlinfo.cpp | 37 |
1 files changed, 7 insertions, 30 deletions
diff --git a/src/vm/mlinfo.cpp b/src/vm/mlinfo.cpp index 608d2b7fc6..f9439e7396 100644 --- a/src/vm/mlinfo.cpp +++ b/src/vm/mlinfo.cpp @@ -428,22 +428,8 @@ CustomMarshalerHelper *SetupCustomMarshalerHelper(LPCUTF8 strMarshalerTypeName, EEMarshalingData *pMarshalingData = NULL; - // Retrieve the marshalling data for the current app domain. - if (pAssembly->IsDomainNeutral()) - { - // If the assembly is shared, then it should only reference other domain neutral assemblies. - // This assumption MUST be true for the current custom marshaling scheme to work. - // This implies that the type of the managed parameter must be a shared type. - _ASSERTE(hndManagedType.GetAssembly()->IsDomainNeutral()); - - // The assembly is shared so we need to use the system domain's marshaling data. - pMarshalingData = SystemDomain::System()->GetMarshalingData(); - } - else - { - // The assembly is not shared so we use the current app domain's marshaling data. - pMarshalingData = GetThread()->GetDomain()->GetMarshalingData(); - } + // The assembly is not shared so we use the current app domain's marshaling data. + pMarshalingData = GetThread()->GetDomain()->GetMarshalingData(); // Retrieve the custom marshaler helper from the EE marshaling data. RETURN pMarshalingData->GetCustomMarshalerHelper(pAssembly, hndManagedType, strMarshalerTypeName, cMarshalerTypeNameBytes, strCookie, cCookieStrBytes); @@ -1188,11 +1174,10 @@ CustomMarshalerHelper *EEMarshalingData::GetCustomMarshalerHelper(Assembly *pAss CustomMarshalerHelper* pNewCMHelper = NULL; NewHolder<CustomMarshalerInfo> pNewCMInfo(NULL); - BOOL bSharedHelper = pAssembly->IsDomainNeutral(); TypeHandle hndCustomMarshalerType; // Create the key that will be used to lookup in the hashtable. - EECMHelperHashtableKey Key(cMarshalerTypeNameBytes, strMarshalerTypeName, cCookieStrBytes, strCookie, hndManagedType.GetInstantiation(), bSharedHelper); + EECMHelperHashtableKey Key(cMarshalerTypeNameBytes, strMarshalerTypeName, cCookieStrBytes, strCookie, hndManagedType.GetInstantiation()); // Lookup the custom marshaler helper in the hashtable. if (m_CMHelperHashtable.GetValue(&Key, (HashDatum*)&pCMHelper)) @@ -1223,19 +1208,11 @@ CustomMarshalerHelper *EEMarshalingData::GetCustomMarshalerHelper(Assembly *pAss pAssembly = NULL; - if (bSharedHelper) - { - // Create the custom marshaler helper in the specified heap. - pNewCMHelper = new (m_pHeap) SharedCustomMarshalerHelper(pAssembly, hndManagedType, strMarshalerTypeName, cMarshalerTypeNameBytes, strCookie, cCookieStrBytes); - } - else - { - // Create the custom marshaler info in the specified heap. - pNewCMInfo = new (m_pHeap) CustomMarshalerInfo(m_pDomain, hndCustomMarshalerType, hndManagedType, strCookie, cCookieStrBytes); + // Create the custom marshaler info in the specified heap. + pNewCMInfo = new (m_pHeap) CustomMarshalerInfo(m_pDomain, hndCustomMarshalerType, hndManagedType, strCookie, cCookieStrBytes); - // Create the custom marshaler helper in the specified heap. - pNewCMHelper = new (m_pHeap) NonSharedCustomMarshalerHelper(pNewCMInfo); - } + // Create the custom marshaler helper in the specified heap. + pNewCMHelper = new (m_pHeap) NonSharedCustomMarshalerHelper(pNewCMInfo); } // Take the app domain lock before we insert the custom marshaler info into the hashtable. |