未验证 提交 9cfe4f87 编写于 作者: E Elinor Fung 提交者: GitHub

Remove AppDomain::GetFusionContext (#188)

It is just the TPA binder context now.

Remove dead code
上级 b4c44297
......@@ -76,7 +76,6 @@ namespace BINDER_SPACE
m_pFailureCache = NULL;
m_contextCS = NULL;
m_pTrustedPlatformAssemblyMap = nullptr;
m_pFileNameHash = nullptr;
}
ApplicationContext::~ApplicationContext()
......@@ -93,11 +92,6 @@ namespace BINDER_SPACE
{
delete m_pTrustedPlatformAssemblyMap;
}
if (m_pFileNameHash != nullptr)
{
delete m_pFileNameHash;
}
}
HRESULT ApplicationContext::Init()
......@@ -220,7 +214,6 @@ namespace BINDER_SPACE
// Parse TrustedPlatformAssemblies
//
m_pTrustedPlatformAssemblyMap = new SimpleNameToFileNameMap();
m_pFileNameHash = new TpaFileNameHash();
sTrustedPlatformAssemblies.Normalize();
......@@ -349,10 +342,6 @@ namespace BINDER_SPACE
}
m_pTrustedPlatformAssemblyMap->AddOrReplace(mapEntry);
FileNameMapEntry fileNameExistenceEntry;
fileNameExistenceEntry.m_wszFileName = wszFileName;
m_pFileNameHash->AddOrReplace(fileNameExistenceEntry);
}
//
......
......@@ -482,16 +482,11 @@ CreateAssemblyNameObject(
if (parseDisplayName)
{
hr = pName->Init(NULL, NULL);
if (FAILED(hr)) {
goto exit;
}
hr = pName->Parse((LPWSTR)szAssemblyName);
}
else
{
hr = pName->Init(szAssemblyName, NULL);
hr = pName->SetName(szAssemblyName);
}
if (FAILED(hr))
......@@ -507,40 +502,6 @@ exit:
return hr;
}
// ---------------------------------------------------------------------------
// CreateAssemblyNameObjectFromMetaData
// ---------------------------------------------------------------------------
STDAPI
CreateAssemblyNameObjectFromMetaData(
LPASSEMBLYNAME *ppAssemblyName,
LPCOLESTR szAssemblyName,
ASSEMBLYMETADATA *pamd)
{
HRESULT hr = S_OK;
CAssemblyName *pName = NULL;
pName = NEW(CAssemblyName);
if (!pName)
{
hr = E_OUTOFMEMORY;
goto exit;
}
hr = pName->Init(szAssemblyName, pamd);
if (FAILED(hr))
{
SAFERELEASE(pName);
goto exit;
}
*ppAssemblyName = pName;
exit:
return hr;
}
// ---------------------------------------------------------------------------
// CAssemblyName constructor
// ---------------------------------------------------------------------------
......@@ -566,50 +527,15 @@ CAssemblyName::~CAssemblyName()
}
// ---------------------------------------------------------------------------
// CAssemblyName::Init
// CAssemblyName::SetName
// ---------------------------------------------------------------------------
HRESULT
CAssemblyName::Init(LPCTSTR pszAssemblyName, ASSEMBLYMETADATA *pamd)
HRESULT CAssemblyName::SetName(LPCTSTR pszAssemblyName)
{
HRESULT hr = S_OK;
if (pszAssemblyName == nullptr)
return E_INVALIDARG;
// Name
if (pszAssemblyName)
{
hr = SetProperty(ASM_NAME_NAME, (LPTSTR) pszAssemblyName,
(DWORD)((wcslen(pszAssemblyName)+1) * sizeof(TCHAR)));
if (FAILED(hr))
goto exit;
}
if (pamd) {
// Major version
if (FAILED(hr = SetProperty(ASM_NAME_MAJOR_VERSION,
&pamd->usMajorVersion, sizeof(WORD)))
// Minor version
|| FAILED(hr = SetProperty(ASM_NAME_MINOR_VERSION,
&pamd->usMinorVersion, sizeof(WORD)))
// Revision number
|| FAILED(hr = SetProperty(ASM_NAME_REVISION_NUMBER,
&pamd->usRevisionNumber, sizeof(WORD)))
// Build number
|| FAILED(hr = SetProperty(ASM_NAME_BUILD_NUMBER,
&pamd->usBuildNumber, sizeof(WORD)))
// Culture
|| FAILED(hr = SetProperty(ASM_NAME_CULTURE,
pamd->szLocale, pamd->cbLocale * sizeof(WCHAR)))
)
{
goto exit;
}
}
exit:
return hr;
return SetProperty(ASM_NAME_NAME, (LPTSTR) pszAssemblyName,
(DWORD)((wcslen(pszAssemblyName)+1) * sizeof(TCHAR)));
}
// ---------------------------------------------------------------------------
......
......@@ -24,28 +24,6 @@ namespace BINDER_SPACE
{
//=============================================================================================
// Data structures for Simple Name -> File Name hash
struct FileNameMapEntry
{
LPWSTR m_wszFileName;
};
class FileNameHashTraits : public NoRemoveSHashTraits< DefaultSHashTraits< FileNameMapEntry > >
{
public:
typedef PCWSTR key_t;
static const FileNameMapEntry Null() { FileNameMapEntry e; e.m_wszFileName = nullptr; return e; }
static bool IsNull(const FileNameMapEntry & e) { return e.m_wszFileName == nullptr; }
static key_t GetKey(const FileNameMapEntry & e)
{
key_t key;
key = e.m_wszFileName;
return key;
}
static count_t Hash(const key_t &str) { return HashiString(str); }
static BOOL Equals(const key_t &lhs, const key_t &rhs) { LIMITED_METHOD_CONTRACT; return (_wcsicmp(lhs, rhs) == 0); }
};
typedef SHash<FileNameHashTraits> TpaFileNameHash;
// Entry in SHash table that maps namespace to list of files
struct SimpleNameToFileNameMapEntry
......@@ -133,7 +111,6 @@ namespace BINDER_SPACE
HRESULT hrBindResult);
inline StringArrayList *GetAppPaths();
inline SimpleNameToFileNameMap *GetTpaList();
inline TpaFileNameHash *GetTpaFileNameList();
inline StringArrayList *GetPlatformResourceRoots();
inline StringArrayList *GetAppNiPaths();
......@@ -159,7 +136,6 @@ namespace BINDER_SPACE
StringArrayList m_appNiPaths;
SimpleNameToFileNameMap * m_pTrustedPlatformAssemblyMap;
TpaFileNameHash * m_pFileNameHash;
};
#include "applicationcontext.inl"
......
......@@ -69,11 +69,6 @@ SimpleNameToFileNameMap * ApplicationContext::GetTpaList()
return m_pTrustedPlatformAssemblyMap;
}
TpaFileNameHash * ApplicationContext::GetTpaFileNameList()
{
return m_pFileNameHash;
}
StringArrayList * ApplicationContext::GetPlatformResourceRoots()
{
return &m_platformResourceRoots;
......
......@@ -79,7 +79,7 @@ public:
CAssemblyName();
virtual ~CAssemblyName();
HRESULT Init(LPCTSTR pszAssemblyName, ASSEMBLYMETADATA *pamd);
HRESULT SetName(LPCTSTR pszAssemblyName);
HRESULT Parse(LPCWSTR szDisplayName);
};
......@@ -89,12 +89,6 @@ CreateAssemblyNameObject(
LPCOLESTR szAssemblyName,
bool parseDisplayName);
STDAPI
CreateAssemblyNameObjectFromMetaData(
LPASSEMBLYNAME *ppAssemblyName,
LPCOLESTR szAssemblyName,
ASSEMBLYMETADATA *pamd);
namespace fusion
{
namespace util
......
......@@ -650,7 +650,6 @@ BaseDomain::BaseDomain()
m_fDisableInterfaceCache = FALSE;
m_pFusionContext = NULL;
m_pTPABinderContext = NULL;
// Make sure the container is set to NULL so that it gets loaded when it is used.
......@@ -794,7 +793,7 @@ void BaseDomain::InitVSD()
#ifndef CROSSGEN_COMPILE
void BaseDomain::ClearFusionContext()
void BaseDomain::ClearBinderContext()
{
CONTRACTL
{
......@@ -804,10 +803,6 @@ void BaseDomain::ClearFusionContext()
}
CONTRACTL_END;
if(m_pFusionContext) {
m_pFusionContext->Release();
m_pFusionContext = NULL;
}
if (m_pTPABinderContext) {
m_pTPABinderContext->Release();
m_pTPABinderContext = NULL;
......@@ -1705,10 +1700,10 @@ void SystemDomain::DetachEnd()
if(m_pSystemDomain)
{
GCX_PREEMP();
m_pSystemDomain->ClearFusionContext();
m_pSystemDomain->ClearBinderContext();
AppDomain* pAppDomain = GetAppDomain();
if (pAppDomain)
pAppDomain->ClearFusionContext();
pAppDomain->ClearBinderContext();
}
}
......@@ -2668,30 +2663,6 @@ void SystemDomain::AddDomain(AppDomain* pDomain)
pDomain));
}
BOOL SystemDomain::RemoveDomain(AppDomain* pDomain)
{
CONTRACTL
{
NOTHROW;
GC_TRIGGERS;
MODE_ANY;
PRECONDITION(CheckPointer(pDomain));
PRECONDITION(!pDomain->IsDefaultDomain());
}
CONTRACTL_END;
// You can not remove the default domain.
if (!pDomain->IsActive())
return FALSE;
pDomain->Release();
return TRUE;
}
#ifdef PROFILING_SUPPORTED
void SystemDomain::NotifyProfilerStartup()
{
......@@ -5344,7 +5315,7 @@ AppDomain::RaiseUnhandledExceptionEvent(OBJECTREF *pThrowable, BOOL isTerminatin
#endif // CROSSGEN_COMPILE
IUnknown *AppDomain::CreateFusionContext()
IUnknown *AppDomain::CreateBinderContext()
{
CONTRACT(IUnknown *)
{
......@@ -5356,23 +5327,17 @@ IUnknown *AppDomain::CreateFusionContext()
}
CONTRACT_END;
if (!m_pFusionContext)
if (!m_pTPABinderContext)
{
ETWOnStartup (FusionAppCtx_V1, FusionAppCtxEnd_V1);
CLRPrivBinderCoreCLR *pTPABinder = NULL;
GCX_PREEMP();
// Initialize the assembly binder for the default context loads for CoreCLR.
IfFailThrow(CCoreCLRBinderHelper::DefaultBinderSetupContext(DefaultADID, &pTPABinder));
m_pFusionContext = reinterpret_cast<IUnknown *>(pTPABinder);
// By default, initial binding context setup for CoreCLR is also the TPABinding context
(m_pTPABinderContext = pTPABinder)->AddRef();
IfFailThrow(CCoreCLRBinderHelper::DefaultBinderSetupContext(DefaultADID, &m_pTPABinderContext));
}
RETURN m_pFusionContext;
RETURN m_pTPABinderContext;
}
......@@ -6879,7 +6844,7 @@ PTR_DomainAssembly AppDomain::FindAssembly(PTR_ICLRPrivAssembly pHostAssembly)
void ZapperSetBindingPaths(ICorCompilationDomain *pDomain, SString &trustedPlatformAssemblies, SString &platformResourceRoots, SString &appPaths, SString &appNiPaths)
{
CLRPrivBinderCoreCLR *pBinder = static_cast<CLRPrivBinderCoreCLR*>(((CompilationDomain *)pDomain)->GetFusionContext());
CLRPrivBinderCoreCLR *pBinder = ((CompilationDomain *)pDomain)->GetTPABinderContext();
_ASSERTE(pBinder != NULL);
pBinder->SetupBindingPaths(trustedPlatformAssemblies, platformResourceRoots, appPaths, appNiPaths);
#ifdef FEATURE_COMINTEROP
......
......@@ -966,14 +966,6 @@ public:
return NULL;
}
#ifdef FEATURE_COMINTEROP
//****************************************************************************************
//
// This will look up interop data for a method table
//
#endif // FEATURE_COMINTEROP
void SetDisableInterfaceCache()
{
m_fDisableInterfaceCache = TRUE;
......@@ -1141,11 +1133,8 @@ public:
#endif // DACCESS_COMPILE && !CROSSGEN_COMPILE
IUnknown *GetFusionContext() {LIMITED_METHOD_CONTRACT; return m_pFusionContext; }
CLRPrivBinderCoreCLR *GetTPABinderContext() {LIMITED_METHOD_CONTRACT; return m_pTPABinderContext; }
CrstExplicitInit * GetLoaderAllocatorReferencesLock()
{
LIMITED_METHOD_CONTRACT;
......@@ -1158,10 +1147,6 @@ protected:
// Helper method to initialize the large heap handle table.
void InitLargeHeapHandleTable();
//****************************************************************************************
// Adds an assembly to the domain.
void AddAssemblyNoLock(Assembly* assem);
//****************************************************************************************
//
// Hash table that maps a MethodTable to COM Interop compatibility data.
......@@ -1186,11 +1171,6 @@ protected:
JitListLock m_JITLock;
ListLock m_ILStubGenLock;
// Fusion context, used for adding assemblies to the is domain. It defines
// fusion properties for finding assemblyies such as SharedBinPath,
// PrivateBinPath, Application Directory, etc.
IUnknown *m_pFusionContext; // Current binding context for the domain
CLRPrivBinderCoreCLR *m_pTPABinderContext; // Reference to the binding context that holds TPA list details
IGCHandleStore* m_handleStore;
......@@ -1215,7 +1195,7 @@ protected:
public:
// Only call this routine when you can guarantee there are no
// loads in progress.
void ClearFusionContext();
void ClearBinderContext();
//****************************************************************************************
// Synchronization holders.
......@@ -2260,7 +2240,7 @@ public:
return m_tpIndex;
}
IUnknown *CreateFusionContext();
IUnknown *CreateBinderContext();
void SetIgnoreUnhandledExceptions()
{
......@@ -3015,10 +2995,6 @@ public:
static void PublishAppDomainAndInformDebugger (AppDomain *pDomain);
#endif // DEBUGGING_SUPPORTED
//****************************************************************************************
// Helper function to remove a domain from the system
BOOL RemoveDomain(AppDomain* pDomain); // Does not decrement the reference
#ifdef PROFILING_SUPPORTED
//****************************************************************************************
// Tell profiler about system created domains which are created before the profiler is
......@@ -3113,10 +3089,6 @@ public:
private:
//****************************************************************************************
// Helper function to create the single COM domain
void CreateDefaultDomain();
//****************************************************************************************
// Helper function to add a domain to the global list
void AddDomain(AppDomain* pDomain);
......
......@@ -807,7 +807,7 @@ ICLRPrivBinder* AssemblySpec::GetBindingContextFromParentAssembly(AppDomain *pDo
// TPABinder context anyways.
//
// Get the reference to the default binding context (this could be the TPABinder context or custom AssemblyLoadContext)
pParentAssemblyBinder = static_cast<ICLRPrivBinder*>(pDomain->GetFusionContext());
pParentAssemblyBinder = static_cast<ICLRPrivBinder*>(pDomain->GetTPABinderContext());
}
}
......@@ -844,7 +844,7 @@ ICLRPrivBinder* AssemblySpec::GetBindingContextFromParentAssembly(AppDomain *pDo
//
// In such a case, the parent assembly (semantically) is CoreLibrary and thus, the default binding context should be
// used as the parent assembly binder.
pParentAssemblyBinder = static_cast<ICLRPrivBinder*>(pDomain->GetFusionContext());
pParentAssemblyBinder = static_cast<ICLRPrivBinder*>(pDomain->GetTPABinderContext());
}
return pParentAssemblyBinder;
......@@ -1221,7 +1221,7 @@ AssemblySpecBindingCache::AssemblyBinding* AssemblySpecBindingCache::LookupInter
else
{
// For System.Private.Corelib Binding context is either not set or if set then it should be TPA
_ASSERTE(pSpec->GetBindingContext() == NULL || pSpec->GetBindingContext() == pSpecDomain->GetFusionContext());
_ASSERTE(pSpec->GetBindingContext() == NULL || pSpec->GetBindingContext() == pSpecDomain->GetTPABinderContext());
}
if (pBinderContextForLookup != NULL)
......
......@@ -198,13 +198,6 @@ CLRPrivBinderWinRT::GetOrCreateBinder(
return clr::SafeAddRef(s_pSingleton);
}
//=====================================================================================================================
STDAPI
CreateAssemblyNameObjectFromMetaData(
LPASSEMBLYNAME *ppAssemblyName,
LPCOLESTR szAssemblyName,
ASSEMBLYMETADATA *pamd);
//=====================================================================================================================
HRESULT CLRPrivBinderWinRT::BindWinRTAssemblyByName(
IAssemblyName * pAssemblyName,
......@@ -300,20 +293,6 @@ HRESULT CLRPrivBinderWinRT::BindWinRTAssemblyByName(
NewHolder<CLRPrivResourcePathImpl> pResource(
new CLRPrivResourcePathImpl(wszFileName));
ReleaseHolder<IAssemblyName> pAssemblyDefName;
// Instead of using the metadata of the assembly to get the AssemblyDef name, fake one up from the filename.
// This ties in with the PreBind binding behavior and ngen. This particular logic was implemented in order
// to provide best performance as actually reading the metadata was prohibitively slow. (Due to the cost of opening
// the assembly file.) We use a zeroed out ASSEMBLYMETADATA structure to create the assembly name object
// in order to ensure that every field of the assembly name is filled out as if this was created from a normal
// assembly def row.
// See comment on CLRPrivBinderWinRT::PreBind for further details about NGEN binding and WinMDs.
ASSEMBLYMETADATA asmd = { 0 };
IfFailGo(CreateAssemblyNameObjectFromMetaData(&pAssemblyDefName, wszFileNameStripped, &asmd));
DWORD dwAsmContentType = AssemblyContentType_WindowsRuntime;
IfFailGo(pAssemblyDefName->SetProperty(ASM_NAME_CONTENT_TYPE, (LPBYTE)&dwAsmContentType, sizeof(dwAsmContentType)));
//
// Creating the BindResult we will pass to the native binder to find native images.
// We strip off the type from the assembly name, leaving the simple assembly name.
......@@ -323,8 +302,6 @@ HRESULT CLRPrivBinderWinRT::BindWinRTAssemblyByName(
// native image for this WinRT assembly.
// The WinRT team has said that WinMDs will have the same simple name as the filename.
//
IfFailGo(pAssemblyDefName->SetProperty(ASM_NAME_NAME, wszFileNameStripped, (DWORD)((wcslen(wszFileNameStripped) + 1) * sizeof(WCHAR))));
NewHolder<CoreBindResult> pBindResult(new CoreBindResult());
StackSString sAssemblyPath(pResource->GetPath());
ReleaseHolder<BINDER_SPACE::Assembly> pBinderAssembly;
......@@ -391,24 +368,6 @@ HRESULT CLRPrivBinderWinRT::BindWinRTAssemblyByName(
return hr;
}
//=====================================================================================================================
HRESULT CLRPrivBinderWinRT::BindWinRTAssemblyByName(
IAssemblyName * pAssemblyName,
IBindResult ** ppIBindResult)
{
STANDARD_VM_CONTRACT;
HRESULT hr = S_OK;
VALIDATE_ARG_RET(pAssemblyName != nullptr);
VALIDATE_ARG_RET(ppIBindResult != nullptr);
ReleaseHolder<CLRPrivAssemblyWinRT> pWinRTAssembly;
IfFailRet(BindWinRTAssemblyByName(pAssemblyName, &pWinRTAssembly));
IfFailRet(pWinRTAssembly->GetIBindResult(ppIBindResult));
return hr;
}
//
// This method opens the assembly using the CoreCLR Binder, which has logic supporting opening either the IL or
// even just the native image without IL present.
......@@ -964,21 +923,21 @@ CLRPrivBinderWinRT::FindAssemblyForTypeIfLoaded(
CLRPrivAssemblyWinRT::CLRPrivAssemblyWinRT(
CLRPrivBinderWinRT * pBinder,
CLRPrivResourcePathImpl * pResourceIL,
IBindResult * pIBindResult,
CoreBindResult * pBindResult,
BOOL fShareable)
: m_pBinder(nullptr),
m_pResourceIL(nullptr),
m_pIResourceNI(nullptr),
m_pIBindResult(nullptr),
m_pBindResult(nullptr),
m_dwImageTypes(0),
m_FallbackBinder(nullptr)
{
STANDARD_VM_CONTRACT;
VALIDATE_ARG_THROW((pBinder != nullptr) && (pResourceIL != nullptr) && (pIBindResult != nullptr));
VALIDATE_ARG_THROW((pBinder != nullptr) && (pResourceIL != nullptr) && (pBindResult != nullptr));
m_pBinder = clr::SafeAddRef(pBinder);
m_pResourceIL = clr::SafeAddRef(pResourceIL);
m_pIBindResult = clr::SafeAddRef(pIBindResult);
m_pBindResult = clr::SafeAddRef(pBindResult);
}
//=====================================================================================================================
......@@ -1064,7 +1023,7 @@ HRESULT CLRPrivAssemblyWinRT::GetImageResource(
STANDARD_BIND_CONTRACT;
HRESULT hr = S_OK;
VALIDATE_ARG_RET((ppIResource != nullptr) && (m_pIBindResult != nullptr));
VALIDATE_ARG_RET((ppIResource != nullptr) && (m_pBindResult != nullptr));
EX_TRY
{
......@@ -1115,21 +1074,6 @@ HRESULT CLRPrivBinderWinRT::GetBinderID(
return S_OK;
}
//=====================================================================================================================
HRESULT CLRPrivAssemblyWinRT::GetIBindResult(
IBindResult ** ppIBindResult)
{
LIMITED_METHOD_CONTRACT;
VALIDATE_ARG_RET(ppIBindResult != nullptr);
VALIDATE_CONDITION((m_pIBindResult != nullptr), return E_UNEXPECTED);
*ppIBindResult = clr::SafeAddRef(m_pIBindResult);
return S_OK;
}
//=====================================================================================================================
HRESULT CLRPrivAssemblyWinRT::EnsureAvailableImageTypes()
{
......@@ -1143,9 +1087,9 @@ HRESULT CLRPrivAssemblyWinRT::EnsureAvailableImageTypes()
{
if (m_pIResourceNI == nullptr)
{
if (m_pIBindResult->HasNativeImage())
if (m_pBindResult->HasNativeImage())
{
SString sPath = m_pIBindResult->GetNativeImage()->GetPath();
SString sPath = m_pBindResult->GetNativeImage()->GetPath();
m_pIResourceNI = new CLRPrivResourcePathImpl(sPath.GetUnicode());
m_pIResourceNI->AddRef();
}
......@@ -1167,24 +1111,4 @@ ErrExit:
return hr;
}
//=====================================================================================================================
//static
HRESULT CLRPrivAssemblyWinRT::GetIBindResult(
ICLRPrivAssembly * pPrivAssembly,
IBindResult ** ppIBindResult)
{
LIMITED_METHOD_CONTRACT;
HRESULT hr;
VALIDATE_ARG_RET(pPrivAssembly != nullptr);
ReleaseHolder<ICLRPrivAssemblyID_WinRT> pAssemblyID;
IfFailRet(pPrivAssembly->QueryInterface(__uuidof(ICLRPrivAssemblyID_WinRT), (LPVOID *)&pAssemblyID));
// QI succeeded, we can cast up:
CLRPrivAssemblyWinRT * pPrivAssemblyWinRT = static_cast<CLRPrivAssemblyWinRT *>(pPrivAssembly);
return pPrivAssemblyWinRT->GetIBindResult(ppIBindResult);
}
#endif //!DACCESS_COMPILE
......@@ -22,9 +22,6 @@
#include "coreclr/corebindresult.h"
// IBindResult maps directly to its one and only implementation on CoreCLR.
typedef CoreBindResult IBindResult;
//=====================================================================================================================
// Forward declarations
class CLRPrivBinderWinRT;
......@@ -158,11 +155,6 @@ public:
IAssemblyName * pIAssemblyName,
ICLRPrivAssembly ** ppPrivAssembly);
// Binds WinRT assemblies only.
HRESULT BindWinRTAssemblyByName(
IAssemblyName * pIAssemblyName,
IBindResult ** ppIBindResult);
HRESULT GetAssemblyAndTryFindNativeImage(SString &sWinmdFilename, LPCWSTR pwzSimpleName, BINDER_SPACE::Assembly ** ppAssembly);
// On Phone the application's APP_PATH CoreCLR hosting config property is used as the app
// package graph for RoResolveNamespace to find 3rd party WinMDs. This method wires up
......@@ -257,18 +249,11 @@ public:
CLRPrivAssemblyWinRT(
CLRPrivBinderWinRT * pBinder,
CLRPrivBinderUtil::CLRPrivResourcePathImpl * pResourceIL,
IBindResult * pIBindResult,
CoreBindResult * pBindResult,
BOOL fShareable);
~CLRPrivAssemblyWinRT();
HRESULT GetIBindResult(
IBindResult ** ppIBindResult);
static HRESULT GetIBindResult(
ICLRPrivAssembly * pPrivAssembly,
IBindResult ** ppIBindResult);
//=============================================================================================
// IUnknown interface methods
......@@ -335,7 +320,7 @@ private:
ReleaseHolder<CLRPrivBinderUtil::CLRPrivResourcePathImpl> m_pResourceIL;
// This cannot be a holder as there can be a race to assign to it.
ICLRPrivResource * m_pIResourceNI;
ReleaseHolder<IBindResult> m_pIBindResult;
ReleaseHolder<CoreBindResult> m_pBindResult;
Volatile<DWORD> m_dwImageTypes;
ReleaseHolder<ICLRPrivBinder> m_FallbackBinder;
}; // class CLRPrivAssemblyWinRT
......@@ -165,7 +165,7 @@ HRESULT CEECompileInfo::CreateDomain(ICorCompilationDomain **ppDomain,
{
GCX_COOP();
pCompilationDomain->CreateFusionContext();
pCompilationDomain->CreateBinderContext();
pCompilationDomain->SetFriendlyName(W("Compilation Domain"));
SystemDomain::System()->LoadDomain(pCompilationDomain);
......
......@@ -324,20 +324,10 @@ HRESULT BaseAssemblySpec::ParseName()
_ASSERTE(pDomain);
BINDER_SPACE::ApplicationContext *pAppContext = NULL;
IUnknown *pIUnknownBinder = pDomain->GetFusionContext();
if (pIUnknownBinder != NULL)
CLRPrivBinderCoreCLR *pBinder = pDomain->GetTPABinderContext();
if (pBinder != NULL)
{
#if !defined(DACCESS_COMPILE) && !defined(CROSSGEN_COMPILE)
if (pDomain->GetFusionContext() != pDomain->GetTPABinderContext())
{
pAppContext = (static_cast<CLRPrivBinderAssemblyLoadContext *>(static_cast<ICLRPrivBinder*>(pIUnknownBinder)))->GetAppContext();
}
else
#endif // !defined(DACCESS_COMPILE) && !defined(CROSSGEN_COMPILE)
{
pAppContext = (static_cast<CLRPrivBinderCoreCLR *>(pIUnknownBinder))->GetAppContext();
}
pAppContext = pBinder->GetAppContext();
}
hr = CCoreCLRBinderHelper::GetAssemblyIdentity(m_pAssemblyName, pAppContext, pAssemblyIdentity);
......
......@@ -688,7 +688,7 @@ HRESULT CorHost2::_CreateAppDomain(
if (dwFlags & APPDOMAIN_FORCE_TRIVIAL_WAIT_OPERATIONS)
pDomain->SetForceTrivialWaitOperations();
pDomain->CreateFusionContext();
pDomain->CreateBinderContext();
{
GCX_COOP();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册