summaryrefslogtreecommitdiff
path: root/src/vm/domainfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/domainfile.cpp')
-rw-r--r--src/vm/domainfile.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/vm/domainfile.cpp b/src/vm/domainfile.cpp
index 314f165eea..6b30ee7c3a 100644
--- a/src/vm/domainfile.cpp
+++ b/src/vm/domainfile.cpp
@@ -1473,7 +1473,9 @@ DomainAssembly::DomainAssembly(AppDomain *pDomain, PEFile *pFile, LoaderAllocato
m_fCollectible(pLoaderAllocator->IsCollectible()),
m_fHostAssemblyPublished(false),
m_fCalculatedShouldLoadDomainNeutral(false),
- m_fShouldLoadDomainNeutral(false)
+ m_fShouldLoadDomainNeutral(false),
+ m_pLoaderAllocator(pLoaderAllocator),
+ m_NextDomainAssemblyInSameALC(NULL)
{
CONTRACTL
{
@@ -1485,13 +1487,6 @@ DomainAssembly::DomainAssembly(AppDomain *pDomain, PEFile *pFile, LoaderAllocato
pFile->ValidateForExecution();
-#ifndef CROSSGEN_COMPILE
- if (m_fCollectible)
- {
- ((AssemblyLoaderAllocator *)pLoaderAllocator)->SetDomainAssembly(this);
- }
-#endif
-
// !!! backout
m_hExposedAssemblyObject = NULL;
@@ -2005,7 +2000,7 @@ void DomainAssembly::Allocate()
// Go ahead and create new shared version of the assembly if possible
// <TODO> We will need to pass a valid OBJECREF* here in the future when we implement SCU </TODO>
- assemblyHolder = pAssembly = Assembly::Create(pSharedDomain, GetFile(), GetDebuggerInfoBits(), FALSE, pamTracker, NULL);
+ assemblyHolder = pAssembly = Assembly::Create(pSharedDomain, GetFile(), GetDebuggerInfoBits(), this->IsCollectible(), pamTracker, this->IsCollectible() ? this->GetLoaderAllocator() : NULL);
if (MissingDependenciesCheckDone())
pAssembly->SetMissingDependenciesCheckDone();
@@ -2040,7 +2035,7 @@ void DomainAssembly::Allocate()
// <TODO> We will need to pass a valid OBJECTREF* here in the future when we implement SCU </TODO>
SharedDomain * pSharedDomain = SharedDomain::GetDomain();
- assemblyHolder = pAssembly = Assembly::Create(pSharedDomain, GetFile(), GetDebuggerInfoBits(), FALSE, pamTracker, NULL);
+ assemblyHolder = pAssembly = Assembly::Create(pSharedDomain, GetFile(), GetDebuggerInfoBits(), this->IsCollectible(), pamTracker, this->IsCollectible() ? this->GetLoaderAllocator() : NULL);
pAssembly->SetIsTenured();
}
#endif // FEATURE_LOADER_OPTIMIZATION
@@ -2051,7 +2046,7 @@ void DomainAssembly::Allocate()
GetFile()->MakeMDImportPersistent();
// <TODO> We will need to pass a valid OBJECTREF* here in the future when we implement SCU </TODO>
- assemblyHolder = pAssembly = Assembly::Create(m_pDomain, GetFile(), GetDebuggerInfoBits(), FALSE, pamTracker, NULL);
+ assemblyHolder = pAssembly = Assembly::Create(m_pDomain, GetFile(), GetDebuggerInfoBits(), this->IsCollectible(), pamTracker, this->IsCollectible() ? this->GetLoaderAllocator() : NULL);
assemblyHolder->SetIsTenured();
}