//---------------------------------------------------------------------------------------------------------------------
PEAssembly * AppDomain::BindAssemblySpec(
AssemblySpec * pSpec,
- BOOL fThrowOnFileNotFound,
- BOOL fUseHostBinderIfAvailable)
+ BOOL fThrowOnFileNotFound)
{
STATIC_CONTRACT_THROWS;
STATIC_CONTRACT_GC_TRIGGERS;
goto EndTry2; // Goto end of try block.
PTR_CLRPrivAssemblyWinRT assem = dac_cast<PTR_CLRPrivAssemblyWinRT>(pAssembly->GetHostAssembly());
- assem->SetFallbackBinder(pSpec->GetHostBinder());
+ assem->SetFallbackBinder(pSpec->GetFallbackLoadContextBinderForRequestingAssembly());
EndTry2:;
}
// The combination of this conditional catch/ the following if statement which will throw reduces the count of exceptions
// static binding goes through this path.
virtual PEAssembly * BindAssemblySpec(
AssemblySpec *pSpec,
- BOOL fThrowOnFileNotFound,
- BOOL fUseHostBinderIfAvailable = TRUE) DAC_EMPTY_RET(NULL);
+ BOOL fThrowOnFileNotFound) DAC_EMPTY_RET(NULL);
HRESULT BindAssemblySpecForHostedBinder(
AssemblySpec * pSpec,
ETWOnStartup (LoaderCatchCall_V1, LoaderCatchCallEnd_V1);
AppDomain* pDomain = GetAppDomain();
-
- ICLRPrivBinder* pBinder = GetHostBinder();
-
- // If no binder was explicitly set, check if parent assembly has a binder.
- if (pBinder == nullptr)
- {
- pBinder = GetBindingContextFromParentAssembly(pDomain);
- }
DomainAssembly* pAssembly = nullptr;
if (CanUseWithBindingCache())
THROWS;
GC_TRIGGERS;
MODE_ANY;
- // Host binder based assembly spec's cannot currently be safely inserted into caches.
- PRECONDITION(pSpec->GetHostBinder() == nullptr);
POSTCONDITION(UnsafeContains(this, pSpec));
POSTCONDITION(UnsafeVerifyLookupAssembly(this, pSpec, pAssembly));
INJECT_FAULT(COMPlusThrowOM(););
THROWS;
GC_TRIGGERS;
MODE_ANY;
- // Host binder based assembly spec's cannot currently be safely inserted into caches.
- PRECONDITION(pSpec->GetHostBinder() == nullptr);
POSTCONDITION((!RETVAL) || (UnsafeContains(this, pSpec) && UnsafeVerifyLookupFile(this, pSpec, pFile)));
INJECT_FAULT(COMPlusThrowOM(););
}
THROWS;
GC_TRIGGERS;
MODE_ANY;
- // Host binder based assembly spec's cannot currently be safely inserted into caches.
- PRECONDITION(pSpec->GetHostBinder() == nullptr);
DISABLED(POSTCONDITION(UnsafeContains(this, pSpec))); //<TODO>@todo: Getting violations here - StoreExceptions could happen anywhere so this is possibly too aggressive.</TODO>
INJECT_FAULT(COMPlusThrowOM(););
}
STATIC_CONTRACT_LIMITED_METHOD;
return HasUniqueIdentity();
}
-
- inline ICLRPrivBinder *GetHostBinder() const
- {
- LIMITED_METHOD_CONTRACT;
- return m_pHostBinder;
- }
-
- inline void SetHostBinder(ICLRPrivBinder *pHostBinder)
- {
- LIMITED_METHOD_CONTRACT;
- m_pHostBinder = pHostBinder;
- }
-
};
#define INITIAL_ASM_SPEC_HASH_SIZE 7
LPCWSTR m_wszCodeBase; // URL to the code
LPCSTR m_szWinRtTypeNamespace;
LPCSTR m_szWinRtTypeClassName;
- ICLRPrivBinder *m_pHostBinder;
int m_ownedFlags;
ICLRPrivBinder *m_pBindingContext;
m_context = pSpec->m_context;
- m_pHostBinder = pSpec->m_pHostBinder;
-
if ((pSpec->m_ownedFlags & BAD_NAME_OWNED) != 0)
{
m_ownedFlags |= BAD_NAME_OWNED;
// If there is a host binder then use it to bind the assembly.
if (isWinRT)
{
- pAssemblyHolder = pDomain->BindAssemblySpec(&spec, TRUE, FALSE);
+ pAssemblyHolder = pDomain->BindAssemblySpec(&spec, TRUE);
}
else
{
AssemblySpec mscorlib;
mscorlib.InitializeSpec(SystemDomain::SystemFile());
- GetAppDomain()->BindAssemblySpec(&mscorlib,TRUE,FALSE);
+ GetAppDomain()->BindAssemblySpec(&mscorlib,TRUE);
if (!IsReadyToRunCompilation() && !SystemDomain::SystemFile()->HasNativeImage())
{
PEAssembly *CompilationDomain::BindAssemblySpec(
AssemblySpec *pSpec,
- BOOL fThrowOnFileNotFound,
- BOOL fUseHostBinderIfAvailable)
+ BOOL fThrowOnFileNotFound)
{
PEAssembly *pFile = NULL;
//
//
pFile = AppDomain::BindAssemblySpec(
pSpec,
- fThrowOnFileNotFound,
- fUseHostBinderIfAvailable);
+ fThrowOnFileNotFound);
}
EX_HOOK
{
PEAssembly *BindAssemblySpec(
AssemblySpec *pSpec,
- BOOL fThrowOnFileNotFound,
- BOOL fUseHostBinderIfAvailable = TRUE) DAC_EMPTY_RET(NULL);
+ BOOL fThrowOnFileNotFound) DAC_EMPTY_RET(NULL);
BOOL CanEagerBindToZapFile(Module *targetModule, BOOL limitToHardBindList = TRUE);