Remove FEATURE_HOSTED_BINDER definition (#4838)
authorJan Vorlicek <janvorli@microsoft.com>
Sat, 7 May 2016 08:47:59 +0000 (10:47 +0200)
committerJan Vorlicek <janvorli@microsoft.com>
Sat, 7 May 2016 08:47:59 +0000 (10:47 +0200)
The FEATURE_HOSTED_BINDER is always on so remove it from all the sources.

45 files changed:
clr.coreclr.props
clr.defines.targets
clr.desktop.props
clrdefinitions.cmake
src/debug/daccess/stdafx.h
src/dlls/mscoree/mscoree.cpp
src/inc/corhost.h
src/inc/dacvars.h
src/inc/holder.h
src/md/compiler/classfactory.cpp
src/mscorlib/src/System/Reflection/Assembly.cs
src/mscorlib/src/System/RuntimeHandles.cs
src/vm/appdomain.cpp
src/vm/appdomain.hpp
src/vm/appdomainnative.cpp
src/vm/appdomainnative.hpp
src/vm/assemblynative.cpp
src/vm/assemblynative.hpp
src/vm/assemblyspec.cpp
src/vm/assemblyspec.hpp
src/vm/baseassemblyspec.h
src/vm/baseassemblyspec.inl
src/vm/ceeload.cpp
src/vm/clrprivbinderreflectiononlywinrt.h
src/vm/clrprivbinderwinrt.h
src/vm/clrprivtypecachereflectiononlywinrt.h
src/vm/clrprivtypecachewinrt.h
src/vm/compile.cpp
src/vm/corhost.cpp
src/vm/domainfile.cpp
src/vm/domainfile.inl
src/vm/interoputil.cpp
src/vm/multicorejit.cpp
src/vm/multicorejitimpl.h
src/vm/multicorejitplayer.cpp
src/vm/pefile.cpp
src/vm/pefile.h
src/vm/peimage.cpp
src/vm/peimage.h
src/vm/runtimehandles.cpp
src/vm/runtimehandles.h
src/vm/typeparse.cpp
src/vm/typeparse.h
src/vm/typestring.h
src/zap/zapper.cpp

index 121968f..ce27318 100644 (file)
@@ -71,7 +71,6 @@
     <FeatureWindowsPhone>true</FeatureWindowsPhone>
     <FeatureManagedEtw>true</FeatureManagedEtw>
     <FeatureManagedEtwChannels>true</FeatureManagedEtwChannels>
-    <FeatureHostedBinder>true</FeatureHostedBinder>
     <BinderDebugLog Condition="'$(_BuildType)'=='dbg'">true</BinderDebugLog>
     <FeatureAppX>true</FeatureAppX>
     <FeatureWinMDResilient>true</FeatureWinMDResilient>
index d6e25dc..2d8d0ce 100644 (file)
@@ -44,7 +44,6 @@
         <CDefines Condition="'$(FeatureFusion)' == 'true'">$(CDefines);FEATURE_FUSION</CDefines>
         <CDefines Condition="'$(FeatureHijack)' == 'true'">$(CDefines);FEATURE_HIJACK</CDefines>
         <CDefines Condition="'$(FeatureHostAssemblyResolver)' == 'true'">$(CDefines);FEATURE_HOST_ASSEMBLY_RESOLVER</CDefines>
-        <CDefines Condition="'$(FeatureHostedBinder)' == 'true'">$(CDefines);FEATURE_HOSTED_BINDER</CDefines>
         <CDefines Condition="'$(FeatureImpersonation)' == 'true'">$(CDefines);FEATURE_IMPERSONATION</CDefines>
         <CDefines Condition="'$(FeatureIncludeAllInterfaces)' == 'true'">$(CDefines);FEATURE_INCLUDE_ALL_INTERFACES</CDefines>
         <CDefines Condition="'$(FeatureInteropDebugging)' == 'true'">$(CDefines);FEATURE_INTEROP_DEBUGGING</CDefines>
         <DefineConstants Condition="'$(FeatureExceptionNotifications)' == 'true'">$(DefineConstants);FEATURE_EXCEPTION_NOTIFICATIONS</DefineConstants>
         <DefineConstants Condition="'$(FeatureFusion)' == 'true'">$(DefineConstants);FEATURE_FUSION</DefineConstants>
         <DefineConstants Condition="'$(FeatureHostAssemblyResolver)' == 'true'">$(DefineConstants);FEATURE_HOST_ASSEMBLY_RESOLVER</DefineConstants>
-        <DefineConstants Condition="'$(FeatureHostedBinder)' == 'true'">$(DefineConstants);FEATURE_HOSTED_BINDER</DefineConstants>
         <DefineConstants Condition="'$(FeatureHosting)' == 'true'">$(DefineConstants);FEATURE_HOSTING</DefineConstants>
         <DefineConstants Condition="'$(FeatureIdentityReference)' == 'true'">$(DefineConstants);FEATURE_IDENTITY_REFERENCE</DefineConstants>
         <DefineConstants Condition="'$(FeatureImpersonation)' == 'true'">$(DefineConstants);FEATURE_IMPERSONATION</DefineConstants>
index 88a4d9f..050249a 100644 (file)
@@ -44,7 +44,6 @@
     <FeatureFusion>true</FeatureFusion>
     <FeatureHijack>true</FeatureHijack>
     <FeatureHosting>true</FeatureHosting>
-    <FeatureHostedBinder>true</FeatureHostedBinder>
     <FeatureIdentityReference>true</FeatureIdentityReference>
     <FeatureImpersonation>true</FeatureImpersonation>
     <FeatureIncludeAllInterfaces>true</FeatureIncludeAllInterfaces>
index 24d7d64..8345e4d 100644 (file)
@@ -118,7 +118,6 @@ if(NOT CLR_CMAKE_PLATFORM_UNIX_ARM AND NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
     add_definitions(-DFEATURE_HIJACK)
 endif(NOT CLR_CMAKE_PLATFORM_UNIX_ARM AND NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
 add_definitions(-DFEATURE_HOST_ASSEMBLY_RESOLVER)
-add_definitions(-DFEATURE_HOSTED_BINDER)
 add_definitions(-DFEATURE_ICASTABLE)
 if (CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
   add_definitions(-DFEATURE_IMPLICIT_TLS)
index 0a765d6..5c2d376 100644 (file)
@@ -47,9 +47,9 @@
 #include <xcordebug.h>
 #include "dacimpl.h"
 
-#if defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_APPX_BINDER)
+#if defined(FEATURE_APPX_BINDER)
 #include <clrprivbinderappx.h>
-#endif // defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_APPX)
+#endif // defined(FEATURE_APPX)
 
 #define STRSAFE_NO_DEPRECATE
 #include <strsafe.h>
index 74d3f97..3756835 100644 (file)
@@ -32,9 +32,7 @@
 extern ICLRRuntimeInfo *g_pCLRRuntime;
 #endif // !FEATURE_CORECLR && !CROSSGEN_COMPILE
 
-#ifdef FEATURE_HOSTED_BINDER
 #include "clrprivhosting.h"
-#endif
 
 #ifndef FEATURE_CORECLR
 #include "clr/win32.h"
@@ -260,9 +258,7 @@ STDAPI InternalDllGetClassObject(
     if (rclsid == CLSID_CorMetaDataDispenser || rclsid == CLSID_CorMetaDataDispenserRuntime ||
         rclsid == CLSID_CorRuntimeHost || rclsid == CLSID_CLRRuntimeHost ||
         rclsid == CLSID_TypeNameFactory
-#ifdef FEATURE_HOSTED_BINDER
         || rclsid == __uuidof(CLRPrivRuntime)
-#endif
        )
     {
         hr = MetaDataDllGetClassObject(rclsid, riid, ppv);
index 2607c7d..579088c 100644 (file)
@@ -33,9 +33,7 @@
 #endif
 #include "holder.h"
 
-#if defined(FEATURE_HOSTED_BINDER)
 #include "clrprivhosting.h"
-#endif
 
 #ifdef FEATURE_COMINTEROP
 #include "activation.h" // WinRT activation.
@@ -736,10 +734,8 @@ class CorHost2 :
     , public CLRValidator
     , public CorDebuggerInfo
     , public ICLRRuntimeHost
-#endif // FEATURE_CORECLR
-#if defined(FEATURE_HOSTED_BINDER) && !defined(FEATURE_CORECLR)
     , public ICLRPrivRuntime
-#endif
+#endif // FEATURE_CORECLR
     , public CorExecutionManager
 {
     friend struct _DacGlobals;
@@ -859,7 +855,7 @@ public:
 
 #endif // !FEATURE_CORECLR
 
-#if defined(FEATURE_HOSTED_BINDER) && !defined(FEATURE_CORECLR)
+#if !defined(FEATURE_CORECLR)
     /**********************************************************************************
      ** ICLRPrivRuntime Methods
      **********************************************************************************/
@@ -884,7 +880,7 @@ public:
         ICLRPrivBinder * pBinder,
         int * pRetVal);
 
-#endif // FEATURE_HOSTED_BINDER && !FEATURE_CORECLR
+#endif // !FEATURE_CORECLR
 
     static IHostControl *GetHostControl ()
     {
@@ -1082,7 +1078,6 @@ private:
 
 #endif // FEATURE_CORECLR
 
-#if defined(FEATURE_CORECLR) || defined(FEATURE_HOSTED_BINDER)
     // Helpers for both ICLRRuntimeHost2 and ICLRPrivRuntime
     HRESULT _CreateAppDomain(
         LPCWSTR wszFriendlyName,
@@ -1092,7 +1087,7 @@ private:
         int nProperties, 
         LPCWSTR* pPropertyNames, 
         LPCWSTR* pPropertyValues,
-#if defined(FEATURE_HOSTED_BINDER) && !defined(FEATURE_CORECLR)
+#if !defined(FEATURE_CORECLR)
         ICLRPrivBinder* pBinder,
 #endif
         DWORD* pAppDomainID);
@@ -1103,12 +1098,9 @@ private:
         LPCWSTR wszClassName,     
         LPCWSTR wszMethodName,
         INT_PTR* fnPtr);
-#endif // defined(FEATURE_CORECLR) || defined(FEATURE_HOSTED_BINDER)
 
-#ifdef FEATURE_HOSTED_BINDER
     // entrypoint helper to be wrapped in a filter to process unhandled exceptions
     VOID ExecuteMainInner(Assembly* pRootAssembly);
-#endif // FEATURE_HOSTED_BINDER
 
     static LONG  m_RefCount;
 
index 709700a..82fa48c 100644 (file)
@@ -325,9 +325,9 @@ DEFINE_DACVAR(ULONG, HRESULT, dac__g_hrFatalError, ::g_hrFatalError)
 DEFINE_DACVAR(ULONG, DWORD, AssemblyUsageLogManager__s_UsageLogFlags, AssemblyUsageLogManager::s_UsageLogFlags)
 #endif // FEATURE_CORECLR
 
-#if defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_APPX_BINDER)
+#if defined(FEATURE_APPX_BINDER)
 DEFINE_DACVAR(ULONG, PTR_CLRPrivBinderAppX, CLRPrivBinderAppX__s_pSingleton, CLRPrivBinderAppX::s_pSingleton)
-#endif //defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_APPX)
+#endif //defined(FEATURE_APPX)
 
 #ifdef FEATURE_MINIMETADATA_IN_TRIAGEDUMPS
 DEFINE_DACVAR(ULONG, DWORD, dac__g_MiniMetaDataBuffMaxSize, ::g_MiniMetaDataBuffMaxSize)
index 4a915d1..a4d19bb 100644 (file)
@@ -108,7 +108,7 @@ struct AutoExpVisibleValue
         const class AssemblyLocation                        *_asAssemblyLocation;
 #endif //FEATURE_FUSION
 
-#if defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_APPX)
+#if defined(FEATURE_APPX)
         const class AppXBindResultImpl                      *_asAppXBindResultImpl;
 #endif
 
index cc07d6c..603f797 100644 (file)
@@ -24,9 +24,7 @@
 #include "mscoree.h"
 #include "corhost.h"
 
-#ifdef FEATURE_HOSTED_BINDER
 #include "clrprivhosting.h"
-#endif
 
 extern HRESULT TypeNameFactoryCreateObject(REFIID riid, void **ppUnk);
 
@@ -49,9 +47,7 @@ const COCLASS_REGISTER g_CoClasses[] =
 
     { &CLSID_CorRuntimeHost,              W("CorRuntimeHost"),              CorHost::CreateObject },
     { &CLSID_CLRRuntimeHost,              W("CLRRuntimeHost"),              CorHost2::CreateObject },
-#ifdef FEATURE_HOSTED_BINDER
     { &__uuidof(CLRPrivRuntime),          W("CLRPrivRuntime"),              CorHost2::CreateObject },
-#endif
     { &CLSID_TypeNameFactory,             NULL,                           (PFN_CREATE_OBJ)TypeNameFactoryCreateObject },
 #endif // FEATURE_CORECLR && !CROSSGEN_COMPILE
     { NULL,                               NULL,                           NULL }
index 4e5ca96..1dfe2f8 100644 (file)
@@ -1593,8 +1593,7 @@ namespace System.Reflection
             return InternalLoadAssemblyName(an, securityEvidence, null, ref stackMark, true /*thrownOnFileNotFound*/, forIntrospection, suppressSecurityChecks);
         }
 
-#if FEATURE_HOSTED_BINDER
-        // Wrapper function to wrap the typical use of InternalLoad. Matches exactly with the signature below if FEATURE_HOSTED_BINDER is not set
+        // Wrapper function to wrap the typical use of InternalLoad.
         [System.Security.SecurityCritical]  // auto-generated
         internal static RuntimeAssembly InternalLoad(String assemblyString,
                                                      Evidence assemblySecurity,
@@ -1603,15 +1602,13 @@ namespace System.Reflection
         {
             return InternalLoad(assemblyString, assemblySecurity,  ref stackMark, IntPtr.Zero, forIntrospection);
         }
-#endif
+
         [System.Security.SecurityCritical]  // auto-generated
         [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
         internal static RuntimeAssembly InternalLoad(String assemblyString,
                                                      Evidence assemblySecurity,
                                                      ref StackCrawlMark stackMark,
-#if FEATURE_HOSTED_BINDER
                                                      IntPtr pPrivHostBinder,
-#endif
                                                      bool forIntrospection)
         {
             RuntimeAssembly assembly;
@@ -1623,9 +1620,7 @@ namespace System.Reflection
             }
 
             return InternalLoadAssemblyName(an, assemblySecurity, null, ref stackMark, 
-#if FEATURE_HOSTED_BINDER
                                             pPrivHostBinder,
-#endif
                                             true  /*thrownOnFileNotFound*/, forIntrospection, false /* suppressSecurityChecks */);
         }
         
@@ -1655,8 +1650,7 @@ namespace System.Reflection
             return an;
         }
         
-#if FEATURE_HOSTED_BINDER
-        // Wrapper function to wrap the typical use of InternalLoadAssemblyName. Matches exactly with the signature below if FEATURE_HOSTED_BINDER is not set
+        // Wrapper function to wrap the typical use of InternalLoadAssemblyName.
         [System.Security.SecurityCritical]  // auto-generated
         internal static RuntimeAssembly InternalLoadAssemblyName(
             AssemblyName assemblyRef,
@@ -1669,7 +1663,6 @@ namespace System.Reflection
         {
             return InternalLoadAssemblyName(assemblyRef, assemblySecurity, reqAssembly, ref stackMark, IntPtr.Zero, true /*throwOnError*/, forIntrospection, suppressSecurityChecks);
         }
-#endif
 
         [System.Security.SecurityCritical]  // auto-generated
         internal static RuntimeAssembly InternalLoadAssemblyName(
@@ -1677,9 +1670,7 @@ namespace System.Reflection
             Evidence assemblySecurity,
             RuntimeAssembly reqAssembly,
             ref StackCrawlMark stackMark,
-#if FEATURE_HOSTED_BINDER
             IntPtr pPrivHostBinder,
-#endif
             bool throwOnFileNotFound, 
             bool forIntrospection,
             bool suppressSecurityChecks)
@@ -1739,9 +1730,7 @@ namespace System.Reflection
             }
 
             return nLoad(assemblyRef, codeBase, assemblySecurity, reqAssembly, ref stackMark,
-#if FEATURE_HOSTED_BINDER
                 pPrivHostBinder,
-#endif
                 throwOnFileNotFound, forIntrospection, suppressSecurityChecks);
         }
 
@@ -1788,11 +1777,8 @@ namespace System.Reflection
                                                      String codeBase,
                                                      Evidence assemblySecurity,
                                                      RuntimeAssembly locationHint,
-                                                     ref StackCrawlMark stackMark,
-                                              
-#if FEATURE_HOSTED_BINDER
+                                                     ref StackCrawlMark stackMark,                                              
                                                      IntPtr pPrivHostBinder,
-#endif
                                                      bool throwOnFileNotFound,        
                                                      bool forIntrospection,
                                                      bool suppressSecurityChecks);
@@ -1814,17 +1800,13 @@ namespace System.Reflection
                                              Evidence assemblySecurity,
                                              RuntimeAssembly locationHint,
                                              ref StackCrawlMark stackMark,
-#if FEATURE_HOSTED_BINDER
                                              IntPtr pPrivHostBinder,
-#endif
                                              bool throwOnFileNotFound,
                                              bool forIntrospection,
                                              bool suppressSecurityChecks)
         {
             return _nLoad(fileName, codeBase, assemblySecurity, locationHint, ref stackMark,
-#if FEATURE_HOSTED_BINDER
                 pPrivHostBinder,
-#endif
                 throwOnFileNotFound, forIntrospection, suppressSecurityChecks);
         }
 
@@ -1861,9 +1843,7 @@ namespace System.Reflection
                 // also try versionless bind from the package
                 an.Version = null;
                 return nLoad(an, null, null, null, ref stackMark, 
-#if FEATURE_HOSTED_BINDER
                        IntPtr.Zero,
-#endif
                        false, false, false);
             }
             return null;
@@ -1897,9 +1877,7 @@ namespace System.Reflection
             RuntimeAssembly result = null;
             try {
                 result = nLoad(an, null, securityEvidence, null, ref stackMark, 
-#if FEATURE_HOSTED_BINDER
                                IntPtr.Zero,
-#endif
                                true, false, false);
             }
             catch(Exception e) {
@@ -1923,9 +1901,7 @@ namespace System.Reflection
                 {
                     an.Version = null;
                     result = nLoad(an, null, securityEvidence, null, ref stackMark, 
-#if FEATURE_HOSTED_BINDER
                                    IntPtr.Zero,
-#endif
                                    false, false, false);
                 }   
            }
@@ -2788,9 +2764,7 @@ namespace System.Reflection
                     {
                         // present in the GAC, load it from there
                         retAssembly = nLoad(an, null, null, this, ref stackMark, 
-#if FEATURE_HOSTED_BINDER
                                             IntPtr.Zero,
-#endif
                                             throwOnFileNotFound, false, false);
                     }
                 }
@@ -2818,9 +2792,7 @@ namespace System.Reflection
                     else if (!bIsAppXDevMode)
                     {
                         retAssembly = nLoad(an, null, null, this, ref stackMark, 
-#if FEATURE_HOSTED_BINDER
                                             IntPtr.Zero,
-#endif
                                             throwOnFileNotFound, false, false);
                     }
                 }
@@ -2829,9 +2801,7 @@ namespace System.Reflection
 #endif // !FEATURE_CORECLR
             {
                 retAssembly = nLoad(an, null, null, this,  ref stackMark, 
-#if FEATURE_HOSTED_BINDER
                                     IntPtr.Zero,
-#endif
                                     throwOnFileNotFound, false, false);
             }
 
@@ -2890,9 +2860,7 @@ namespace System.Reflection
                 {
                     retAssembly = useLoadFile ? nLoadFile(fileNameOrCodeBase, null) :
                                                 nLoad(loadFromAsmName, fileNameOrCodeBase, null, this, ref stackMark,
-#if FEATURE_HOSTED_BINDER
                                                 IntPtr.Zero,
-#endif
                                                 throwOnFileNotFound, false, false);
                 }
                 catch (FileNotFoundException)
@@ -2923,9 +2891,7 @@ namespace System.Reflection
                     {
                         retAssembly = useLoadFile ? nLoadFile(fileNameOrCodeBase, null) :
                                                     nLoad(loadFromAsmName, fileNameOrCodeBase,  null, this, ref stackMark,
-#if FEATURE_HOSTED_BINDER
                                                           IntPtr.Zero,
-#endif
                                                           false /* do not throw on file not found */, false, false);
                             
                     }
index c4e0a8d..7d4628a 100644 (file)
@@ -534,24 +534,18 @@ namespace System
         [DllImport(JitHelpers.QCall, CharSet = CharSet.Unicode)]
         [SuppressUnmanagedCodeSecurity]
         private extern static void GetTypeByName(string name, bool throwOnError, bool ignoreCase, bool reflectionOnly, StackCrawlMarkHandle stackMark, 
-#if FEATURE_HOSTED_BINDER
             IntPtr pPrivHostBinder,
-#endif
             bool loadTypeFromPartialName, ObjectHandleOnStack type, ObjectHandleOnStack keepalive);
 
-#if FEATURE_HOSTED_BINDER
         // Wrapper function to reduce the need for ifdefs.
         internal static RuntimeType GetTypeByName(string name, bool throwOnError, bool ignoreCase, bool reflectionOnly, ref StackCrawlMark stackMark, bool loadTypeFromPartialName)
         {
             return GetTypeByName(name, throwOnError, ignoreCase, reflectionOnly, ref stackMark, IntPtr.Zero, loadTypeFromPartialName);
         }
-#endif
 
         [System.Security.SecuritySafeCritical]  // auto-generated
         internal static RuntimeType GetTypeByName(string name, bool throwOnError, bool ignoreCase, bool reflectionOnly, ref StackCrawlMark stackMark,
-#if FEATURE_HOSTED_BINDER
                                                   IntPtr pPrivHostBinder,
-#endif
                                                   bool loadTypeFromPartialName)
         {
             if (name == null || name.Length == 0)
@@ -567,9 +561,7 @@ namespace System
             Object keepAlive = null;
             GetTypeByName(name, throwOnError, ignoreCase, reflectionOnly,
                 JitHelpers.GetStackCrawlMarkHandle(ref stackMark),
-#if FEATURE_HOSTED_BINDER
                 pPrivHostBinder,
-#endif
                 loadTypeFromPartialName, JitHelpers.GetObjectHandleOnStack(ref type), JitHelpers.GetObjectHandleOnStack(ref keepAlive));
             GC.KeepAlive(keepAlive);
 
@@ -927,7 +919,7 @@ namespace System
     }                                       
 
     [Serializable]
-[System.Runtime.InteropServices.ComVisible(true)]
+    [System.Runtime.InteropServices.ComVisible(true)]
     public unsafe struct RuntimeMethodHandle : ISerializable
     {
         // Returns handle for interop with EE. The handle is guaranteed to be non-null.
index 9a90371..3827d9b 100644 (file)
 #include "../binder/inc/clrprivbindercoreclr.h"
 #endif
 
-#if defined(FEATURE_APPX_BINDER) && defined(FEATURE_HOSTED_BINDER)
+#if defined(FEATURE_APPX_BINDER)
 #include "appxutil.h"
 #include "clrprivbinderappx.h"
 #endif
 
-#ifdef FEATURE_HOSTED_BINDER
 #include "clrprivtypecachewinrt.h"
-#endif
 
 #ifndef FEATURE_CORECLR
 #include "nlsinfo.h"
@@ -3409,11 +3407,8 @@ int g_fInitializingInitialAD = 0;
 // This routine completes the initialization of the default domaine.
 // After this call mananged code can be executed.
 void SystemDomain::InitializeDefaultDomain(
-    BOOL allowRedirects
-#ifdef FEATURE_HOSTED_BINDER
-    , ICLRPrivBinder * pBinder
-#endif
-    )
+    BOOL allowRedirects,
+    ICLRPrivBinder * pBinder)
 {
     STANDARD_VM_CONTRACT;
 
@@ -3474,7 +3469,6 @@ void SystemDomain::InitializeDefaultDomain(
 
     AppDomain* pDefaultDomain = SystemDomain::System()->DefaultDomain();
 
-#ifdef FEATURE_HOSTED_BINDER
     if (pBinder != nullptr)
     {
         pDefaultDomain->SetLoadContextHostBinder(pBinder);
@@ -3486,7 +3480,6 @@ void SystemDomain::InitializeDefaultDomain(
             pDefaultDomain->SetLoadContextHostBinder(pAppXBinder);
         }
     #endif
-#endif
 
     {
         GCX_COOP();
@@ -5066,7 +5059,6 @@ void AppDomain::Init()
     SetStage( STAGE_CREATING);
 
 
-#ifdef FEATURE_HOSTED_BINDER
     // The lock is taken also during stack walking (GC or profiler)
     //  - To prevent deadlock with GC thread, we cannot trigger GC while holding the lock
     //  - To prevent deadlock with profiler thread, we cannot allow thread suspension
@@ -5076,7 +5068,6 @@ void AppDomain::Init()
                     | CRST_DEBUGGER_THREAD 
                     INDEBUG(| CRST_DEBUG_ONLY_CHECK_FORBID_SUSPEND_THREAD)));
     m_crstHostAssemblyMapAdd.Init(CrstHostAssemblyMapAdd);
-#endif //FEATURE_HOSTED_BINDER
 
     m_dwId = SystemDomain::GetNewAppDomainId(this);
 
@@ -7637,7 +7628,6 @@ DomainAssembly * AppDomain::FindAssembly(PEAssembly * pFile, FindAssemblyOptions
 
     const bool includeFailedToLoad = (options & FindAssemblyOptions_IncludeFailedToLoad) != 0;
 
-#ifdef FEATURE_HOSTED_BINDER
     if (pFile->HasHostAssembly())
     {
         DomainAssembly * pDA = FindAssembly(pFile->GetHostAssembly());
@@ -7647,7 +7637,6 @@ DomainAssembly * AppDomain::FindAssembly(PEAssembly * pFile, FindAssemblyOptions
         }
         return nullptr;
     }
-#endif
 
     AssemblyIterator i = IterateAssembliesEx((AssemblyIterationFlags)(
         kIncludeLoaded | 
@@ -8194,7 +8183,6 @@ BOOL AppDomain::PostBindResolveAssembly(AssemblySpec  *pPrePolicySpec,
     return fFailure;
 }
 
-#ifdef FEATURE_HOSTED_BINDER
 //----------------------------------------------------------------------------------------
 // Helper class for hosted binder
 
@@ -8477,7 +8465,6 @@ AppDomain::BindHostedPrivAssembly(
 
     return S_OK;
 } // AppDomain::BindHostedPrivAssembly
-#endif // FEATURE_HOSTED_BINDER
 
 //---------------------------------------------------------------------------------------------------------------------
 PEAssembly * AppDomain::BindAssemblySpec(
@@ -8498,7 +8485,7 @@ PEAssembly * AppDomain::BindAssemblySpec(
 
     BOOL fForceReThrow = FALSE;
 
-#if defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_APPX_BINDER)
+#if defined(FEATURE_APPX_BINDER)
     //
     // If there is a host binder available and this is an unparented bind within the
     // default load context, then the bind will be delegated to the domain-wide host
@@ -8626,8 +8613,8 @@ EndTry1:;
         return pAssembly.Extract();
     }
     else
-#endif //FEATURE_HOSTED_BINDER && FEATURE_APPX_BINDER
-#if defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_COMINTEROP)
+#endif // FEATURE_APPX_BINDER
+#if defined(FEATURE_COMINTEROP)
     // Handle WinRT assemblies in the classic/hybrid scenario. If this is an AppX process,
     // then this case will be handled by the previous block as part of the full set of
     // available binding hosts.
@@ -8709,7 +8696,7 @@ EndTry2:;
         return pAssembly.Extract();
     }
     else
-#endif // FEATURE_HOSTED_BINDER && FEATURE_COMINTEROP
+#endif // FEATURE_COMINTEROP
     if (pSpec->HasUniqueIdentity())
     {
         HRESULT hrBindResult = S_OK;
@@ -14625,7 +14612,6 @@ TypeEquivalenceHashTable * AppDomain::GetTypeEquivalenceCache()
 
 #endif //FEATURE_TYPEEQUIVALENCE
 
-#if defined(FEATURE_HOSTED_BINDER)
 #if !defined(DACCESS_COMPILE)
 
 //---------------------------------------------------------------------------------------------------------------------
@@ -14835,8 +14821,6 @@ PTR_DomainAssembly AppDomain::FindAssembly(PTR_ICLRPrivAssembly pHostAssembly)
     }
 }
 
-#endif //FEATURE_HOSTED_BINDER
-
 #if !defined(DACCESS_COMPILE) && defined(FEATURE_CORECLR) && defined(FEATURE_NATIVE_IMAGE_GENERATION)
 
 void ZapperSetBindingPaths(ICorCompilationDomain *pDomain, SString &trustedPlatformAssemblies, SString &platformResourceRoots, SString &appPaths, SString &appNiPaths)
index cad939c..97e8438 100644 (file)
@@ -2529,7 +2529,6 @@ public:
         AssemblyLoadSecurity *pLoadSecurity = NULL,
         BOOL fUseHostBinderIfAvailable = TRUE) DAC_EMPTY_RET(NULL);
 
-#ifdef FEATURE_HOSTED_BINDER
     HRESULT BindAssemblySpecForHostedBinder(
         AssemblySpec *   pSpec, 
         IAssemblyName *  pAssemblyName, 
@@ -2542,7 +2541,6 @@ public:
         IAssemblyName *    pAssemblyName, 
         PEAssembly **      ppAssembly, 
         BOOL               fIsIntrospectionOnly = FALSE) DAC_EMPTY_RET(S_OK);
-#endif // FEATURE_HOSTED_BINDER
 
 #ifdef FEATURE_REFLECTION_ONLY_LOAD    
     virtual DomainAssembly *BindAssemblySpecForIntrospectionDependencies(AssemblySpec *pSpec) DAC_EMPTY_RET(NULL);
@@ -3949,7 +3947,6 @@ public:
     COMNlsHashProvider *m_pNlsHashProvider;
 #endif // !FEATURE_CORECLR
 
-#ifdef FEATURE_HOSTED_BINDER
 private:
     // This is the root-level default load context root binder. If null, then
     // the Fusion binder is used; otherwise this binder is used.
@@ -4154,7 +4151,6 @@ private:
         DomainAssembly* pAssembly);
 #endif // DACCESS_COMPILE
 
-#endif //FEATURE_HOSTED_BINDER
 #ifdef FEATURE_PREJIT
     friend void DomainFile::InsertIntoDomainFileWithNativeImageList();
     Volatile<DomainFile *> m_pDomainFileWithNativeImageList;
@@ -4372,12 +4368,7 @@ public:
 #endif
     static void ActivateApplication(int *pReturnValue);
 
-    static void InitializeDefaultDomain(
-        BOOL allowRedirects
-#ifdef FEATURE_HOSTED_BINDER
-        , ICLRPrivBinder * pBinder = NULL
-#endif
-        );
+    static void InitializeDefaultDomain(BOOL allowRedirects, ICLRPrivBinder * pBinder = NULL);
     static void SetupDefaultDomain();
     static HRESULT SetupDefaultDomainNoThrow();
 
index ccdc31a..a96c643 100644 (file)
 #if defined(FEATURE_APPX)
 #include "appxutil.h"
 #endif // FEATURE_APPX
-#if defined(FEATURE_APPX_BINDER) && defined(FEATURE_HOSTED_BINDER)
+#if defined(FEATURE_APPX_BINDER)
 #include "clrprivbinderappx.h"
 #include "clrprivtypecachewinrt.h"
-#endif // FEATURE_APPX_BINDER && FEATURE_HOSTED_BINDER
+#endif // FEATURE_APPX_BINDER
 #ifdef FEATURE_VERSIONING
 #include "../binder/inc/clrprivbindercoreclr.h"
 #endif
@@ -1728,7 +1728,7 @@ FCIMPL0(INT64, AppDomainNative::GetLastSurvivedProcessMemorySize)
 FCIMPLEND
 #endif // FEATURE_APPDOMAIN_RESOURCE_MONITORING
 
-#if defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_APPX_BINDER)
+#if defined(FEATURE_APPX_BINDER)
 ICLRPrivBinder * QCALLTYPE AppDomainNative::CreateDesignerContext(LPCWSTR *rgPaths, 
                                                             UINT cPaths,
                                                             BOOL fShared)
@@ -1778,5 +1778,5 @@ void QCALLTYPE AppDomainNative::SetCurrentDesignerContext(BOOL fDesignerContext,
 
     END_QCALL;
 }
-#endif // defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_APPX_BINDER)
+#endif // defined(FEATURE_APPX_BINDER)
 
index 47bbc6f..ee3af20 100644 (file)
@@ -141,7 +141,7 @@ public:
     void QCALLTYPE RegisterWithHost(IUnknown *punkAppDomainManager);
 #endif // FEATURE_APPDOMAINMANAGER_INITOPTIONS
 
-#if defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_APPX_BINDER)
+#if defined(FEATURE_APPX_BINDER)
     static
     ICLRPrivBinder * QCALLTYPE CreateDesignerContext(LPCWSTR *rgPaths, UINT cPaths, BOOL fShared);
 
index c3deaab..c825171 100644 (file)
@@ -52,7 +52,7 @@
 #include "assemblynativeresource.h"
 #endif // !FEATURE_CORECLR
 
-#if defined(FEATURE_HOSTED_BINDER) && !defined(FEATURE_CORECLR)
+#if !defined(FEATURE_CORECLR)
 #include "clrprivbinderloadfile.h" 
 #endif
 
@@ -137,7 +137,6 @@ FCIMPL1(FC_BOOL_RET, AssemblyNative::IsNewPortableAssembly, AssemblyNameBaseObje
 FCIMPLEND
 #endif // FEATURE_FUSION
 
-#ifdef FEATURE_HOSTED_BINDER
 FCIMPL9(Object*, AssemblyNative::Load, AssemblyNameBaseObject* assemblyNameUNSAFE, 
         StringObject* codeBaseUNSAFE, 
         Object* securityUNSAFE, 
@@ -147,16 +146,6 @@ FCIMPL9(Object*, AssemblyNative::Load, AssemblyNameBaseObject* assemblyNameUNSAF
         CLR_BOOL fThrowOnFileNotFound,
         CLR_BOOL fForIntrospection,
         CLR_BOOL fSuppressSecurityChecks)
-#else // !FEATURE_HOSTED_BINDER
-FCIMPL8(Object*, AssemblyNative::Load, AssemblyNameBaseObject* assemblyNameUNSAFE, 
-        StringObject* codeBaseUNSAFE, 
-        Object* securityUNSAFE, 
-        AssemblyBaseObject* requestingAssemblyUNSAFE,
-        StackCrawlMark* stackMark,
-        CLR_BOOL fThrowOnFileNotFound,
-        CLR_BOOL fForIntrospection,
-        CLR_BOOL fSuppressSecurityChecks)
-#endif // FEATURE_HOSTED_BINDER
 {
     FCALL_CONTRACT;
 
@@ -200,11 +189,9 @@ FCIMPL8(Object*, AssemblyNative::Load, AssemblyNameBaseObject* assemblyNameUNSAF
     }
     else if (!fForIntrospection)
     {
-#ifdef FEATURE_HOSTED_BINDER
         // name specified, if immersive ignore the codebase
         if (GetThread()->GetDomain()->HasLoadContextHostBinder())
             gc.codeBase = NULL;
-#endif //FEATURE_HOSTED_BINDER
 
         // Compute parent assembly
         Assembly * pRefAssembly;
@@ -243,13 +230,11 @@ FCIMPL8(Object*, AssemblyNative::Load, AssemblyNameBaseObject* assemblyNameUNSAF
         EEFileLoadException::Throw(&spec, COR_E_NOTSUPPORTED);
     }
     
-#ifdef FEATURE_HOSTED_BINDER
     if (pPrivHostBinder != NULL)
     {
         pParentAssembly = NULL;
         spec.SetHostBinder(pPrivHostBinder);
     }
-#endif // FEATURE_HOSTED_BINDER
     
     if (gc.codeBase != NULL)
         spec.SetCodeBase(&(pThread->m_MarshalAlloc), &gc.codeBase);
@@ -385,12 +370,12 @@ Assembly* AssemblyNative::LoadFromBuffer(BOOL fForIntrospection, const BYTE* pAs
 
         CLRPrivBinderLoadFile* pBinderToUse = NULL;
 
-#if defined(FEATURE_HOSTED_BINDER) && !defined(FEATURE_CORECLR)
+#if !defined(FEATURE_CORECLR)
         if (GetAppDomain()->HasLoadContextHostBinder())
         {
             pBinderToUse = CLRPrivBinderLoadFile::GetOrCreateBinder();
         }
-#endif //  FEATURE_HOSTED_BINDER && !FEATURE_CORECLR
+#endif // !FEATURE_CORECLR
 
         pFile = PEAssembly::OpenMemory(pCallersAssembly->GetManifestFile(),
                                                   pAssemblyData, (COUNT_T)uAssemblyLength, 
index d191457..6309ffc 100644 (file)
@@ -50,7 +50,6 @@ public:
                                                                 Object* securityUNSAFE);
     static FCDECL6(Object*,         LoadImage,                  U1Array* PEByteArrayUNSAFE, U1Array* SymByteArrayUNSAFE, Object* securityUNSAFE, StackCrawlMark* stackMark, CLR_BOOL fForIntrospection, SecurityContextSource securityContextSource);
 
-#ifdef FEATURE_HOSTED_BINDER
     static FCDECL9(Object*,         Load,                       AssemblyNameBaseObject* assemblyNameUNSAFE, 
                                                                 StringObject* codeBaseUNSAFE, 
                                                                 Object* securityUNSAFE, 
@@ -61,17 +60,6 @@ public:
                                                                 CLR_BOOL fForIntrospection,
                                                                 CLR_BOOL fSuppressSecurityChecks);
 
-#else //!FEATURE_HOSTED_BINDER
-    static FCDECL8(Object*,         Load,                       AssemblyNameBaseObject* assemblyNameUNSAFE, 
-                                                                StringObject* codeBaseUNSAFE, 
-                                                                Object* securityUNSAFE, 
-                                                                AssemblyBaseObject* requestingAssemblyUNSAFE,
-                                                                StackCrawlMark* stackMark,
-                                                                CLR_BOOL fThrowOnFileNotFound,
-                                                                CLR_BOOL fForIntrospection,
-                                                                CLR_BOOL fSuppressSecurityChecks);
-#endif // FEATURE_HOSTED_BINDER
-
     static FCDECL1(FC_BOOL_RET, IsFrameworkAssembly, AssemblyNameBaseObject* refAssemblyNameUNSAFE);
     static FCDECL1(FC_BOOL_RET, IsNewPortableAssembly, AssemblyNameBaseObject* refAssemblyNameUNSAFE);
 
index 634be16..b3707d7 100644 (file)
@@ -1403,7 +1403,6 @@ DomainAssembly *AssemblySpec::LoadDomainAssembly(FileLoadLevel targetLevel,
 
     DomainAssembly *pAssembly = nullptr;
 
-#ifdef FEATURE_HOSTED_BINDER
     ICLRPrivBinder * pBinder = GetHostBinder();
     
     // If no binder was explicitly set, check if parent assembly has a binder.
@@ -1430,7 +1429,7 @@ DomainAssembly *AssemblySpec::LoadDomainAssembly(FileLoadLevel targetLevel,
             pAssembly = pDomain->FindAssembly(pPrivAssembly);
         }
     }
-#endif
+
     if ((pAssembly == nullptr) && CanUseWithBindingCache())
     {
         pAssembly = pDomain->FindCachedAssembly(this);
@@ -2090,10 +2089,8 @@ BOOL AssemblySpecBindingCache::StoreAssembly(AssemblySpec *pSpec, DomainAssembly
         THROWS;
         GC_TRIGGERS;
         MODE_ANY;
-#ifdef FEATURE_HOSTED_BINDER
         // Host binder based assembly spec's cannot currently be safely inserted into caches.
         PRECONDITION(pSpec->GetHostBinder() == nullptr);
-#endif // FEATURE_HOSTED_BINDER
         POSTCONDITION(UnsafeContains(this, pSpec));
         POSTCONDITION(UnsafeVerifyLookupAssembly(this, pSpec, pAssembly));
         INJECT_FAULT(COMPlusThrowOM(););
@@ -2175,10 +2172,8 @@ BOOL AssemblySpecBindingCache::StoreFile(AssemblySpec *pSpec, PEAssembly *pFile)
         THROWS;
         GC_TRIGGERS;
         MODE_ANY;
-#ifdef FEATURE_HOSTED_BINDER
         // Host binder based assembly spec's cannot currently be safely inserted into caches.
         PRECONDITION(pSpec->GetHostBinder() == nullptr);
-#endif // FEATURE_HOSTED_BINDER
         POSTCONDITION((!RETVAL) || (UnsafeContains(this, pSpec) && UnsafeVerifyLookupFile(this, pSpec, pFile)));
         INJECT_FAULT(COMPlusThrowOM(););
     }
@@ -2250,10 +2245,8 @@ BOOL AssemblySpecBindingCache::StoreException(AssemblySpec *pSpec, Exception* pE
         THROWS;
         GC_TRIGGERS;
         MODE_ANY;
-#ifdef FEATURE_HOSTED_BINDER
         // Host binder based assembly spec's cannot currently be safely inserted into caches.
         PRECONDITION(pSpec->GetHostBinder() == nullptr);
-#endif // FEATURE_HOSTED_BINDER
         DISABLED(POSTCONDITION(UnsafeContains(this, pSpec))); //<TODO>@todo: Getting violations here - StoreExceptions could happen anywhere so this is possibly too aggressive.</TODO>
         INJECT_FAULT(COMPlusThrowOM(););
     }
@@ -2340,7 +2333,7 @@ BOOL AssemblySpecBindingCache::CompareSpecs(UPTR u1, UPTR u2)
     AssemblySpec *a1 = (AssemblySpec *) (u1 << 1);
     AssemblySpec *a2 = (AssemblySpec *) u2;
 
-#if defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_APPX_BINDER)
+#if defined(FEATURE_APPX_BINDER)
     _ASSERTE(a1->GetAppDomain() == a2->GetAppDomain());
     if (a1->GetAppDomain()->HasLoadContextHostBinder())
         return (CLRPrivBinderUtil::CompareHostBinderSpecs(a1,a2));
@@ -2362,7 +2355,7 @@ BOOL DomainAssemblyCache::CompareBindingSpec(UPTR spec1, UPTR spec2)
     AssemblySpec* pSpec1 = (AssemblySpec*) (spec1 << 1);
     AssemblyEntry* pEntry2 = (AssemblyEntry*) spec2;
 
-#if defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_FUSION)
+#if defined(FEATURE_FUSION)
     AssemblySpec* pSpec2 = &pEntry2->spec;
     _ASSERTE(pSpec1->GetAppDomain() == pSpec2->GetAppDomain());
     if (pSpec1->GetAppDomain()->HasLoadContextHostBinder())
@@ -2461,11 +2454,9 @@ LPCVOID AssemblySpec::GetParentAssemblyPtr()
     LIMITED_METHOD_CONTRACT;
     if(m_pParentAssembly)
     {
-#ifdef FEATURE_HOSTED_BINDER
         if (m_pParentAssembly->GetFile()->HasHostAssembly())
             return m_pParentAssembly->GetFile()->GetHostAssembly();
         else
-#endif
             return m_pParentAssembly->GetFile()->GetFusionAssembly();
     }
     return NULL;
index 89779de..4a7130b 100644 (file)
@@ -150,9 +150,7 @@ class AssemblySpec  : public BaseAssemblySpec
 #ifdef FEATURE_FUSION
         if (pAssembly)
         {
-#ifdef FEATURE_HOSTED_BINDER
             _ASSERTE(GetHostBinder() == nullptr);
-#endif // FEATURE_HOSTED_BINDER
             m_fParentLoadContext=pAssembly->GetFile()->GetLoadContext();
         }
         else
@@ -330,14 +328,13 @@ class AssemblySpec  : public BaseAssemblySpec
     inline BOOL CanUseWithBindingCache() const
     {
         STATIC_CONTRACT_LIMITED_METHOD;
-#if defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_APPX_BINDER)
+#if defined(FEATURE_APPX_BINDER)
         return (GetHostBinder() == nullptr) && HasUniqueIdentity();
 #else
         return HasUniqueIdentity(); 
 #endif
     }
 
-#ifdef FEATURE_HOSTED_BINDER
     inline ICLRPrivBinder *GetHostBinder() const
     {
         LIMITED_METHOD_CONTRACT;
@@ -349,7 +346,6 @@ class AssemblySpec  : public BaseAssemblySpec
         LIMITED_METHOD_CONTRACT;
         m_pHostBinder = pHostBinder;
     }
-#endif
 
 };
 
index 5f582ea..0a21d95 100644 (file)
@@ -33,9 +33,7 @@ protected:
 #endif
     LPCSTR                      m_szWinRtTypeNamespace;
     LPCSTR                      m_szWinRtTypeClassName;
-#ifdef FEATURE_HOSTED_BINDER
     ICLRPrivBinder             *m_pHostBinder;
-#endif
     int                         m_ownedFlags;
     BOOL                        m_fIntrospectionOnly;
 #if defined(FEATURE_CORECLR)
index 0bce7df..53c312f 100644 (file)
@@ -260,9 +260,7 @@ inline void BaseAssemblySpec::CopyFrom(const BaseAssemblySpec *pSpec)
     
     m_context = pSpec->m_context;
 
-#ifdef FEATURE_HOSTED_BINDER
     m_pHostBinder = pSpec->m_pHostBinder;
-#endif
 
 #ifdef FEATURE_CORECLR
     if ((pSpec->m_ownedFlags & BAD_NAME_OWNED) != 0)
index 62cc8f8..db2bc6d 100644 (file)
@@ -83,9 +83,9 @@
 #include "peimagelayout.inl"
 #include "ildbsymlib.h"
 
-#if defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_APPX_BINDER)
+#if defined(FEATURE_APPX_BINDER)
 #include "clrprivbinderappx.h"
-#endif //defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_APPX_BINDER)
+#endif // defined(FEATURE_APPX_BINDER)
 
 #if defined(PROFILING_SUPPORTED)
 #include "profilermetadataemitvalidator.h"
@@ -5636,13 +5636,10 @@ Assembly * Module::GetAssemblyIfLoadedFromNativeAssemblyRefWithRefDefMismatch(md
             // This extended check is designed only to find assemblies loaded via an AssemblySpecBindingCache based binder. Verify that's what we found.
             if(pAssemblyCandidate != NULL)
             {
-#ifdef FEATURE_HOSTED_BINDER
                 if (!pAssemblyCandidate->GetManifestFile()->HasHostAssembly())
-#endif // FEATURE_HOSTED_BINDER
                 {
                     pAssembly = pAssemblyCandidate;
                 }
-#ifdef FEATURE_HOSTED_BINDER
                 else
                 {
                     DWORD binderFlags = 0;
@@ -5661,7 +5658,6 @@ Assembly * Module::GetAssemblyIfLoadedFromNativeAssemblyRefWithRefDefMismatch(md
                         _ASSERTE("Non-AssemblySpecBindingCache based assembly found with extended search" && !(IsStackWalkerThread() || IsGCThread()) && IsGenericInstantiationLookupCompareThread());
                     }
                 }
-#endif // FEATURE_HOSTED_BINDER
             }
         }
     }
@@ -5762,7 +5758,6 @@ Module::GetAssemblyIfLoaded(
                 _ASSERTE(szWinRtClassName != NULL);
                 
                 CLRPrivBinderWinRT * pWinRtBinder = pAppDomainExamine->GetWinRtBinder();
-#ifdef FEATURE_HOSTED_BINDER
                 if (pWinRtBinder == nullptr)
                 {   // We are most likely in AppX mode (calling AppX::IsAppXProcess() for verification is painful in DACCESS)
 #ifndef DACCESS_COMPILE
@@ -5799,7 +5794,6 @@ Module::GetAssemblyIfLoaded(
 #endif // defined(FEATURE_APPX_BINDER)
                     }
                 }
-#endif //FEATURE_HOSTED_BINDER
                 
                 if (pWinRtBinder != nullptr)
                 {
index ffdfc9d..5f8ef46 100644 (file)
@@ -8,7 +8,6 @@
 // 
 //=====================================================================================================================
 
-#ifdef FEATURE_HOSTED_BINDER
 #ifdef FEATURE_REFLECTION_ONLY_LOAD
 
 #pragma once
@@ -294,4 +293,3 @@ private:
 };  // class CLRPrivAssemblyReflectionOnlyWinRT
 
 #endif //FEATURE_REFLECTION_ONLY_LOAD
-#endif //FEATURE_HOSTED_BINDER
index 438e967..caaefff 100644 (file)
@@ -9,8 +9,6 @@
 // 
 //=============================================================================================
 
-#ifdef FEATURE_HOSTED_BINDER
-
 #pragma once
 
 #include "holder.h"
@@ -463,5 +461,3 @@ private:
     BOOL m_fShareable;
     Volatile<DWORD> m_dwImageTypes;
 };  // class CLRPrivAssemblyWinRT
-
-#endif //FEATURE_HOSTED_BINDER
index 6d0183a..a605c3d 100644 (file)
@@ -8,7 +8,6 @@
 // 
 //=====================================================================================================================
 
-#ifdef FEATURE_HOSTED_BINDER
 #ifdef FEATURE_REFLECTION_ONLY_LOAD
 
 #pragma once
@@ -57,4 +56,3 @@ public:
 };  // class CLRPrivTypeCaheReflectionOnlyWinRT
 
 #endif //FEATURE_REFLECTION_ONLY_LOAD
-#endif // FEATURE_HOSTED_BINDER
index c7fe733..8199773 100644 (file)
@@ -8,8 +8,6 @@
 // 
 //=====================================================================================================================
 
-#ifdef FEATURE_HOSTED_BINDER
-
 #pragma once
 
 #include "internalunknownimpl.h"
@@ -70,5 +68,3 @@ private:
 };  // class CLRPrivTypeCaheWinRT
 
 typedef DPTR(CLRPrivTypeCacheWinRT) PTR_CLRPrivTypeCacheWinRT;
-
-#endif // FEATURE_HOSTED_BINDER
index 36bba43..67d4886 100644 (file)
 #include "cgensys.h"
 #include "peimagelayout.inl"
 
-#if defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_APPX_BINDER)
+#if defined(FEATURE_APPX_BINDER)
 #include "appxutil.h"
 #include "clrprivbinderappx.h"
 #include "clrprivtypecachewinrt.h"
-#endif // defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_APPX_BINDER)
+#endif // defined(FEATURE_APPX_BINDER)
 
 #ifdef FEATURE_COMINTEROP
 #include "clrprivbinderwinrt.h"
@@ -163,7 +163,7 @@ HRESULT CEECompileInfo::CreateDomain(ICorCompilationDomain **ppDomain,
     if (pEmitter)
         pCompilationDomain->SetDependencyEmitter(pEmitter);
     
-#if defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_APPX_BINDER)
+#if defined(FEATURE_APPX_BINDER)
     if (AppX::IsAppXProcess())
     {
         HRESULT hr = S_OK;
@@ -173,7 +173,7 @@ HRESULT CEECompileInfo::CreateDomain(ICorCompilationDomain **ppDomain,
         IfFailThrow(pBinder->QueryInterface(IID_ICLRPrivBinder, &pBinderInterface));
         pCompilationDomain->SetLoadContextHostBinder(pBinderInterface);
     }
-#endif // defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_APPX_BINDER)
+#endif // defined(FEATURE_APPX_BINDER)
 
 #ifdef DEBUGGING_SUPPORTED 
     // Notify the debugger here, before the thread transitions into the
index 7fbd0ca..c229a0e 100644 (file)
@@ -50,7 +50,7 @@
 #include "winrttypenameconverter.h"
 #endif
 
-#if defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_APPX_BINDER)
+#if defined(FEATURE_APPX_BINDER)
 #include "clrprivbinderappx.h"
 #include "clrprivtypecachewinrt.h"
 #endif
@@ -1545,7 +1545,6 @@ HRESULT CorHost2::ExecuteInAppDomain(DWORD dwAppDomainId,
     return hr;
 }
 
-#if defined(FEATURE_CORECLR) || defined(FEATURE_HOSTED_BINDER)
 #define EMPTY_STRING_TO_NULL(s) {if(s && s[0] == 0) {s=NULL;};}
 
 HRESULT CorHost2::_CreateAppDomain(
@@ -1556,7 +1555,7 @@ HRESULT CorHost2::_CreateAppDomain(
     int nProperties, 
     LPCWSTR* pPropertyNames, 
     LPCWSTR* pPropertyValues,
-#if defined(FEATURE_HOSTED_BINDER) && !defined(FEATURE_CORECLR)
+#if !defined(FEATURE_CORECLR)
     ICLRPrivBinder* pBinder,
 #endif
     DWORD* pAppDomainID)
@@ -1632,7 +1631,7 @@ HRESULT CorHost2::_CreateAppDomain(
     if (dwFlags & APPDOMAIN_FORCE_TRIVIAL_WAIT_OPERATIONS)
         pDomain->SetForceTrivialWaitOperations();
 
-#if defined(FEATURE_HOSTED_BINDER) && !defined(FEATURE_CORECLR)
+#if !defined(FEATURE_CORECLR)
     if (pBinder != NULL)
         pDomain->SetLoadContextHostBinder(pBinder);
 #endif
@@ -1875,8 +1874,6 @@ HRESULT CorHost2::_CreateDelegate(
     return hr;
 }
 
-#endif // defined(FEATURE_CORECLR) || defined(FEATURE_HOSTED_BINDER)
-
 #ifdef FEATURE_CORECLR
 HRESULT CorHost2::CreateAppDomainWithManager(
     LPCWSTR wszFriendlyName,
@@ -2259,7 +2256,7 @@ STARTUP_FLAGS CorHost2::GetStartupFlags()
 
 #ifndef DACCESS_COMPILE
 
-#if defined(FEATURE_HOSTED_BINDER) && !defined(FEATURE_CORECLR)
+#if !defined(FEATURE_CORECLR)
 /*************************************************************************************
  ** ICLRPrivRuntime Methods
  *************************************************************************************/
@@ -2508,9 +2505,6 @@ VOID CorHost2::ExecuteMainInner(Assembly* pRootAssembly)
     PAL_ENDTRY
 }
 
-#endif // FEATURE_HOSTED_BINDER
-
-#ifndef FEATURE_CORECLR
 // static
 HRESULT CorHost2::SetFlagsAndHostConfig(STARTUP_FLAGS dwStartupFlags, LPCWSTR pwzHostConfigFile, BOOL fFinalize)
 {
@@ -3666,7 +3660,7 @@ HRESULT CorHost2::QueryInterface(REFIID riid, void **ppUnk)
 
         *ppUnk = static_cast<ICLRExecutionManager *>(this);
     }
-#if defined(FEATURE_HOSTED_BINDER) && !defined(FEATURE_CORECLR)
+#if !defined(FEATURE_CORECLR)
     else if (riid == __uuidof(ICLRPrivRuntime))
     {
         ULONG version = 2;
@@ -8734,9 +8728,7 @@ HRESULT STDMETHODCALLTYPE DllGetActivationFactoryImpl(LPCWSTR wszAssemblyName,
 #ifndef FEATURE_CORECLR // coreclr uses winrt binder which does not allow redirects
     {
         BaseDomain::LockHolder lh(pDomain);
-#ifdef FEATURE_HOSTED_BINDER
         if (!pDomain->HasLoadContextHostBinder())
-#endif
         {
             // don't allow redirects
             SystemDomain::InitializeDefaultDomain(FALSE);
index 9ccf46e..2353712 100644 (file)
@@ -1901,13 +1901,11 @@ DomainAssembly::~DomainAssembly()
     }
     CONTRACTL_END;
 
-    #ifdef FEATURE_HOSTED_BINDER
     if (m_fHostAssemblyPublished)
     {
         // Remove association first.
         GetAppDomain()->UnPublishHostedAssembly(this);
     }
-    #endif
 
     ModuleIterator i = IterateModules(kModIterIncludeLoading);
     while (i.Next())
@@ -2273,11 +2271,9 @@ void DomainAssembly::Begin()
         AppDomain::LoadLockHolder lock(m_pDomain);
         m_pDomain->AddAssembly(this);
     }
-#ifdef FEATURE_HOSTED_BINDER
     // Make it possible to find this DomainAssembly object from associated ICLRPrivAssembly.
     GetAppDomain()->PublishHostedAssembly(this);
     m_fHostAssemblyPublished = true;
-#endif
 }
 
 #ifdef FEATURE_PREJIT
@@ -2331,11 +2327,8 @@ void DomainAssembly::FindNativeImage()
 #ifdef FEATURE_FUSION
     DomainAssembly * pDomainAssembly = GetDomainAssembly();
     if (pDomainAssembly->GetSecurityDescriptor()->HasAdditionalEvidence() ||
-        !(pDomainAssembly->GetFile()->IsContextLoad()
-#ifdef FEATURE_HOSTED_BINDER
-        || pDomainAssembly->GetFile()->HasHostAssembly()
-#endif
-        ))
+        !(pDomainAssembly->GetFile()->IsContextLoad() ||
+        pDomainAssembly->GetFile()->HasHostAssembly()))
     {
         m_pFile->SetCannotUseNativeImage();
     }
@@ -2895,13 +2888,11 @@ Retry:
     fInsertIntoAssemblySpecBindingCache = GetFile()->GetLoadContext() == LOADCTX_TYPE_DEFAULT;
 #endif
     
-#if defined(FEATURE_HOSTED_BINDER)
 #if defined(FEATURE_APPX_BINDER)
     fInsertIntoAssemblySpecBindingCache = fInsertIntoAssemblySpecBindingCache && !GetFile()->HasHostAssembly();
 #else
     fInsertIntoAssemblySpecBindingCache = fInsertIntoAssemblySpecBindingCache && GetFile()->CanUseWithBindingCache();
 #endif
-#endif
 
     if (fInsertIntoAssemblySpecBindingCache)
     {
index d746d9f..18ff564 100644 (file)
@@ -105,11 +105,7 @@ inline void DomainAssembly::UpdatePEFile(PTR_PEFile pFile)
     }
     CONTRACTL_END;
 
-#ifdef FEATURE_HOSTED_BINDER
     GetAppDomain()->UpdatePublishHostedAssembly(this, pFile);
-#else
-    this->UpdatePEFileWorker(pFile);
-#endif
 }
 
 #ifdef FEATURE_MULTIMODULE_ASSEMBLIES
index a9ab7d0..011c9d5 100644 (file)
@@ -5384,9 +5384,7 @@ TypeHandle GetWinRTType(SString* ssTypeName, BOOL bThrowIfNotFound)
 
     SString ssAssemblyName(SString::Utf8Literal, "WindowsRuntimeAssemblyName, ContentType=WindowsRuntime");
     DomainAssembly *pAssembly = LoadDomainAssembly(&ssAssemblyName, NULL, 
-#ifdef FEATURE_HOSTED_BINDER
                                                    NULL, 
-#endif
                                                    bThrowIfNotFound, FALSE, ssTypeName);
     if (pAssembly != NULL)
     {
index a40b06b..24154a8 100644 (file)
@@ -356,7 +356,7 @@ ModuleRecord::ModuleRecord(unsigned lenName, unsigned lenAsmName)
     wLoadLevel = 0;
     // Extra data
     lenModuleName = (unsigned short) lenName;
-#if defined(FEATURE_CORECLR) && defined(FEATURE_HOSTED_BINDER)
+#if defined(FEATURE_CORECLR)
     lenAssemblyName = (unsigned short) lenAsmName;
     recordID += RoundUp(lenModuleName) + RoundUp(lenAssemblyName);
 #else
@@ -375,7 +375,7 @@ bool RecorderModuleInfo::SetModule(Module * pMod)
     unsigned lenModuleName = (unsigned) strlen(pModuleName);
     simpleName.Set((const BYTE *) pModuleName, lenModuleName); // SBuffer::Set copies over name
 
-#if defined(FEATURE_CORECLR) && defined(FEATURE_HOSTED_BINDER)
+#if defined(FEATURE_CORECLR)
     SString sAssemblyName;
     StackScratchBuffer scratch;
     pMod->GetAssembly()->GetManifestFile()->GetDisplayName(sAssemblyName);
@@ -422,7 +422,7 @@ HRESULT MulticoreJitRecorder::WriteModuleRecord(IStream * pStream, const Recorde
     const void * pModuleName = module.simpleName;
     unsigned lenModuleName = module.simpleName.GetSize();
 
-#if defined(FEATURE_CORECLR) && defined(FEATURE_HOSTED_BINDER)
+#if defined(FEATURE_CORECLR)
     const void * pAssemblyName = module.assemblyName;
     unsigned lenAssemblyName = module.assemblyName.GetSize();
 #else
@@ -442,7 +442,7 @@ HRESULT MulticoreJitRecorder::WriteModuleRecord(IStream * pStream, const Recorde
     {
         hr = WriteString(pModuleName, lenModuleName, pStream);
 
-#if defined(FEATURE_CORECLR) && defined(FEATURE_HOSTED_BINDER)
+#if defined(FEATURE_CORECLR)
         if (SUCCEEDED(hr))
         {
             hr = WriteString(pAssemblyName, lenAssemblyName, pStream);
@@ -1061,7 +1061,7 @@ HRESULT MulticoreJitRecorder::StartProfile(const wchar_t * pRoot, const wchar_t
 
         NewHolder<MulticoreJitProfilePlayer> player(new (nothrow) MulticoreJitProfilePlayer(
             m_pDomain,
-#if defined(FEATURE_CORECLR) && defined(FEATURE_HOSTED_BINDER)
+#if defined(FEATURE_CORECLR)
             m_pBinderContext,
 #else
             NULL,
@@ -1235,7 +1235,7 @@ void MulticoreJitManager::StartProfile(AppDomain * pDomain, ICLRPrivBinder *pBin
     {
         MulticoreJitRecorder * pRecorder = new (nothrow) MulticoreJitRecorder(
             pDomain,
-#if defined(FEATURE_CORECLR) && defined(FEATURE_HOSTED_BINDER)
+#if defined(FEATURE_CORECLR)
             pBinderContext,
 #else
             NULL,
index 954f14d..58a9df7 100644 (file)
@@ -179,7 +179,7 @@ public:
     unsigned short flags;
     unsigned short wLoadLevel;
     unsigned short lenModuleName;
-#if defined(FEATURE_CORECLR) && defined(FEATURE_HOSTED_BINDER)
+#if defined(FEATURE_CORECLR)
     unsigned short lenAssemblyName;
 #endif
 
@@ -201,7 +201,7 @@ public:
         return (const char *) (this + 1); // after this record
     }
 
-#if defined(FEATURE_CORECLR) && defined(FEATURE_HOSTED_BINDER)
+#if defined(FEATURE_CORECLR)
     unsigned AssemblyNameLen() const
     {
         LIMITED_METHOD_CONTRACT;
@@ -250,7 +250,7 @@ friend class MulticoreJitRecorder;
 
 private:
     ADID                               m_DomainID;
-#if defined(FEATURE_CORECLR) && defined(FEATURE_HOSTED_BINDER)
+#if defined(FEATURE_CORECLR)
     ICLRPrivBinder * m_pBinderContext;
 #endif
     LONG                               m_nMySession;
@@ -300,7 +300,7 @@ private:
 
     HRESULT ReadCheckFile(const wchar_t * pFileName);
 
-#if defined(FEATURE_CORECLR) && defined(FEATURE_HOSTED_BINDER)
+#if defined(FEATURE_CORECLR)
     DomainAssembly * LoadAssembly(SString & assemblyName);
 #endif
 
@@ -344,7 +344,7 @@ class MulticoreJitRecorder
 {
 private:
     AppDomain               * m_pDomain;            // AutoStartProfile could be called from SystemDomain
-#if defined(FEATURE_CORECLR) && defined(FEATURE_HOSTED_BINDER)
+#if defined(FEATURE_CORECLR)
     ICLRPrivBinder * m_pBinderContext;
 #endif
     SString                   m_fullFileName;
@@ -393,7 +393,7 @@ public:
         LIMITED_METHOD_CONTRACT;
 
         m_pDomain           = pDomain;
-#if defined(FEATURE_CORECLR) && defined(FEATURE_HOSTED_BINDER)
+#if defined(FEATURE_CORECLR)
         m_pBinderContext    = pBinderContext;
 #endif
         m_JitInfoCount      = 0;
index 44a1f4f..0c69fdc 100644 (file)
@@ -373,7 +373,7 @@ MulticoreJitProfilePlayer::MulticoreJitProfilePlayer(AppDomain * pDomain, ICLRPr
     LIMITED_METHOD_CONTRACT;
 
     m_DomainID           = pDomain->GetId();
-#if defined(FEATURE_CORECLR) && defined(FEATURE_HOSTED_BINDER)
+#if defined(FEATURE_CORECLR)
     m_pBinderContext     = pBinderContext;
 #endif
     m_nMySession         = nSession;
@@ -464,7 +464,7 @@ bool MulticoreJitManager::IsSupportedModule(Module * pModule, bool fMethodJit, b
         return false;
     }
 
-#if defined(FEATURE_CORECLR) && defined(FEATURE_HOSTED_BINDER)
+#if defined(FEATURE_CORECLR)
     if (pFile->GetPath().IsEmpty()) // Ignore in-memory modules
     {
         return false;
@@ -550,7 +550,7 @@ bool MulticoreJitProfilePlayer::CompileMethodDesc(Module * pModule, MethodDesc *
 
         m_stats.m_nTryCompiling ++;
 
-#if defined(FEATURE_CORECLR) && defined(FEATURE_HOSTED_BINDER)
+#if defined(FEATURE_CORECLR)
         // Reset the flag to allow managed code to be called in multicore JIT background thread from this routine
         ThreadStateNCStackHolder holder(-1, Thread::TSNC_CallingManagedCodeDisabled);
 #endif
@@ -886,7 +886,7 @@ bool MulticoreJitProfilePlayer::HandleModuleDependency(unsigned jitInfo)
 
         PlayerModuleInfo & mod = m_pModules[moduleTo];
 
-#if defined(FEATURE_CORECLR) && defined(FEATURE_HOSTED_BINDER)
+#if defined(FEATURE_CORECLR)
         // Load the module if necessary.
         if (!mod.m_pModule)
         {
@@ -941,7 +941,7 @@ bool MulticoreJitProfilePlayer::HandleModuleDependency(unsigned jitInfo)
     return true;
 }
 
-#if defined(FEATURE_CORECLR) && defined(FEATURE_HOSTED_BINDER)
+#if defined(FEATURE_CORECLR)
 DomainAssembly * MulticoreJitProfilePlayer::LoadAssembly(SString & assemblyName)
 {
     STANDARD_VM_CONTRACT;
@@ -1093,7 +1093,7 @@ HRESULT MulticoreJitProfilePlayer::HandleMethodRecord(unsigned * buffer, int cou
 
                             PlayerModuleInfo & mod = m_pModules[inst >> 24];
 
-#if defined(FEATURE_CORECLR) && defined(FEATURE_HOSTED_BINDER)
+#if defined(FEATURE_CORECLR)
                             _ASSERTE(mod.IsModuleLoaded());
 #else
                             _ASSERTE(mod.IsModuleLoaded() && ! mod.IsLowerLevel());
@@ -1313,7 +1313,7 @@ HRESULT MulticoreJitProfilePlayer::PlayProfile()
                 const ModuleRecord * pRec = (const ModuleRecord * ) pBuffer;
 
                 if (((unsigned)(pRec->lenModuleName
-#if defined(FEATURE_CORECLR) && defined(FEATURE_HOSTED_BINDER)
+#if defined(FEATURE_CORECLR)
                     + pRec->lenAssemblyName
 #endif
                     ) > (rcdLen - sizeof(ModuleRecord))) || 
index 1537ef9..123c078 100644 (file)
@@ -55,7 +55,7 @@ SVAL_IMPL_INIT(DWORD, PEFile, s_NGENDebugFlags, 0);
 
 #include "sha1.h"
 
-#if defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_FUSION)
+#if defined(FEATURE_FUSION)
 #include "clrprivbinderfusion.h"
 #include "clrprivbinderappx.h"
 #include "clrprivbinderloadfile.h" 
@@ -98,9 +98,7 @@ PEFile::PEFile(PEImage *identity, BOOL fCheckAuthenticodeSignature/*=TRUE*/) :
     ,m_pSecurityManager(NULL)
     ,m_securityManagerLock(CrstPEFileSecurityManager)
 #endif // FEATURE_CAS_POLICY
-#ifdef FEATURE_HOSTED_BINDER
     ,m_pHostAssembly(nullptr)
-#endif // FEATURE_HOSTED_BINDER
 {
     CONTRACTL
     {
@@ -176,12 +174,10 @@ PEFile::~PEFile()
         CoTaskMemFree(m_certificate);
 #endif // FEATURE_CAS_POLICY
 
-#ifdef FEATURE_HOSTED_BINDER
     if (m_pHostAssembly != NULL)
     {
         m_pHostAssembly->Release();
     }
-#endif
 }
 
 #ifndef  DACCESS_COMPILE
@@ -746,7 +742,6 @@ BOOL PEFile::Equals(PEFile *pFile)
         return FALSE;
     }
 
-#ifdef FEATURE_HOSTED_BINDER
     // Different host assemblies cannot be equal unless they are associated with the same host binder
     // It's ok if only one has a host binder because multiple threads can race to load the same assembly
     // and that may cause temporary candidate PEAssembly objects that never get bound to a host assembly
@@ -765,8 +760,6 @@ BOOL PEFile::Equals(PEFile *pFile)
             return FALSE;
 
     }
-#endif // FEATURE_HOSTED_BINDER
-
 
     // Same identity is equal
     if (m_identity != NULL && pFile->m_identity != NULL
@@ -2977,22 +2970,14 @@ PEAssembly::PEAssembly(
                 IMetaDataEmit* pEmit, 
                 PEFile *creator, 
                 BOOL system,
-                BOOL introspectionOnly/*=FALSE*/
-#ifdef FEATURE_HOSTED_BINDER
-                ,
+                BOOL introspectionOnly/*=FALSE*/,
                 PEImage * pPEImageIL /*= NULL*/,
                 PEImage * pPEImageNI /*= NULL*/,
-                ICLRPrivAssembly * pHostAssembly /*= NULL*/
-#endif
-                )
+                ICLRPrivAssembly * pHostAssembly /*= NULL*/)
 
   : PEFile(pBindResultInfo ? (pBindResultInfo->GetPEImage() ? pBindResultInfo->GetPEImage() : 
                                                               (pBindResultInfo->HasNativeImage() ? pBindResultInfo->GetNativeImage() : NULL)
-#ifdef FEATURE_HOSTED_BINDER
                               ): pPEImageIL? pPEImageIL:(pPEImageNI? pPEImageNI:NULL), FALSE),
-#else
-                              ): NULL, FALSE),
-#endif
     m_creator(clr::SafeAddRef(creator)),
     m_bIsFromGAC(FALSE),
     m_bIsOnTpaList(FALSE)
@@ -3007,9 +2992,7 @@ PEAssembly::PEAssembly(
         CONSTRUCTOR_CHECK;
         PRECONDITION(CheckPointer(pEmit, NULL_OK));
         PRECONDITION(CheckPointer(creator, NULL_OK));
-#ifdef FEATURE_HOSTED_BINDER
         PRECONDITION(pBindResultInfo == NULL || (pPEImageIL == NULL && pPEImageNI == NULL));
-#endif
         STANDARD_VM_CHECK;
     }
     CONTRACTL_END;
@@ -3028,12 +3011,10 @@ PEAssembly::PEAssembly(
 
     // We check the precondition above that either pBindResultInfo is null or both pPEImageIL and pPEImageNI are,
     // so we'll only get a max of one native image passed in.
-#ifdef FEATURE_HOSTED_BINDER
     if (pPEImageNI != NULL)
     {
         SetNativeImage(pPEImageNI);
     }
-#endif
 
 #ifdef FEATURE_PREJIT
     if (pBindResultInfo && pBindResultInfo->HasNativeImage())
@@ -3081,7 +3062,6 @@ PEAssembly::PEAssembly(
         ThrowHR(COR_E_BADIMAGEFORMAT, BFA_EMPTY_ASSEMDEF_NAME);
     }
 
-#ifdef FEATURE_HOSTED_BINDER
     // Set the host assembly and binding context as the AssemblySpec initialization
     // for CoreCLR will expect to have it set.
     if (pHostAssembly != nullptr)
@@ -3095,7 +3075,6 @@ PEAssembly::PEAssembly(
         _ASSERTE(pHostAssembly == nullptr);
         pBindResultInfo->GetBindAssembly(&m_pHostAssembly);
     }
-#endif // FEATURE_HOSTED_BINDER        
     
 #if _DEBUG
     GetCodeBaseOrName(m_debugName);
@@ -3114,8 +3093,6 @@ PEAssembly::PEAssembly(
 #endif // FEATURE_FUSION
 
 
-#if defined(FEATURE_HOSTED_BINDER)
-
 #ifdef FEATURE_FUSION
 
 PEAssembly *PEAssembly::Open(
@@ -3190,9 +3167,6 @@ PEAssembly *PEAssembly::Open(
 
 #endif // FEATURE_FUSION
 
-#endif // FEATURE_HOSTED_BINDER 
-
-
 PEAssembly::~PEAssembly()
 {
     CONTRACTL
@@ -3638,7 +3612,7 @@ PEAssembly *PEAssembly::DoOpenMemory(
     if (!image->CheckILFormat())
         ThrowHR(COR_E_BADIMAGEFORMAT, BFA_BAD_IL);
 
-#if defined(FEATURE_HOSTED_BINDER) && !defined(FEATURE_CORECLR)
+#if !defined(FEATURE_CORECLR)
     if(pBinderToUse != NULL && !isIntrospectionOnly)
     {
         ReleaseHolder<ICLRPrivAssembly> pAsm;
@@ -3649,7 +3623,7 @@ PEAssembly *PEAssembly::DoOpenMemory(
         _ASSERTE(pFile);
         RETURN pFile;
     }
-#endif //  FEATURE_HOSTED_BINDER && !FEATURE_CORECLR
+#endif // !FEATURE_CORECLR
 
 #ifdef FEATURE_FUSION    
     RETURN new PEAssembly(image, NULL, NULL, NULL, NULL, NULL, NULL, pParentAssembly, FALSE, isIntrospectionOnly);
@@ -5159,7 +5133,6 @@ TADDR PEFile::GetMDInternalRWAddress()
 }
 #endif
 
-#if defined(FEATURE_HOSTED_BINDER)
 // Returns the ICLRPrivBinder* instance associated with the PEFile
 PTR_ICLRPrivBinder PEFile::GetBindingContext()
 {
@@ -5179,5 +5152,3 @@ PTR_ICLRPrivBinder PEFile::GetBindingContext()
     
     return pBindingContext;
 }
-#endif // FEATURE_HOSTED_BINDER
-
index 5cf5dfb..5cefd5d 100644 (file)
@@ -40,9 +40,7 @@
 #include "corperm.h"
 #include "eventtrace.h"
 
-#ifdef FEATURE_HOSTED_BINDER
 #include "clrprivbinderutil.h"
-#endif
 
 // --------------------------------------------------------------------------------
 // Forward declared classes
@@ -643,7 +641,6 @@ public:
     {
         LIMITED_METHOD_CONTRACT;
 
-#ifdef FEATURE_HOSTED_BINDER
         DWORD binderFlags = BINDER_NONE;
 
         HRESULT hr = E_FAIL;
@@ -651,9 +648,6 @@ public:
             hr = GetHostAssembly()->GetBinderFlags(&binderFlags);
 
         return hr == S_OK ? binderFlags & BINDER_DESIGNER_BINDING_CONTEXT : FALSE;
-#else
-        return FALSE;
-#endif
     }
 
     LPCWSTR GetPathForErrorMessages();
@@ -662,12 +656,9 @@ public:
     void MarkNativeImageInvalidIfOwned();
     void ConvertMetadataToRWForEnC();
 
-#if defined(FEATURE_VERSIONING) || defined(FEATURE_HOSTED_BINDER)
 protected:
     PTR_ICLRPrivAssembly m_pHostAssembly;
-#endif
 
-#ifdef FEATURE_HOSTED_BINDER
 protected:
 
     friend class CLRPrivBinderFusion;
@@ -693,7 +684,6 @@ public:
 
     bool CanUseWithBindingCache()
     { LIMITED_METHOD_CONTRACT; return !HasHostAssembly(); }
-#endif // FEATURE_HOSTED_BINDER
 };  // class PEFile
 
 
@@ -712,7 +702,6 @@ class PEAssembly : public PEFile
     // Public API
     // ------------------------------------------------------------
 
-#if defined(FEATURE_HOSTED_BINDER)
 #if !defined(FEATURE_CORECLR)
     static PEAssembly * Open(
         PEAssembly *       pParentAssembly,
@@ -734,7 +723,6 @@ class PEAssembly : public PEFile
         ICLRPrivAssembly * pHostAssembly, 
         BOOL               fIsIntrospectionOnly = FALSE);
 #endif //!FEATURE_CORECLR
-#endif //FEATURE_HOSTED_BINDER
 
     // This opens the canonical mscorlib.dll
 #ifdef FEATURE_FUSION
@@ -981,13 +969,10 @@ class PEAssembly : public PEFile
         IMetaDataEmit *pEmit,
         PEFile *creator, 
         BOOL system, 
-        BOOL introspectionOnly = FALSE
-#ifdef FEATURE_HOSTED_BINDER
-        ,
+        BOOL introspectionOnly = FALSE,
         PEImage * pPEImageIL = NULL,
         PEImage * pPEImageNI = NULL,
         ICLRPrivAssembly * pHostAssembly = NULL
-#endif
         );
 #endif
     virtual ~PEAssembly();
@@ -1078,17 +1063,12 @@ class PEAssembly : public PEFile
     // Indicates if the assembly can be cached in a binding cache such as AssemblySpecBindingCache.
     inline bool CanUseWithBindingCache()
     {
-#if defined(FEATURE_HOSTED_BINDER)
             STATIC_CONTRACT_WRAPPER;
 #if !defined(FEATURE_APPX_BINDER)
             return (HasBindableIdentity());
 #else
             return (PEFile::CanUseWithBindingCache() && HasBindableIdentity());
 #endif // FEATURE_CORECLR
-#else
-            STATIC_CONTRACT_LIMITED_METHOD;
-            return true;
-#endif // FEATURE_HOSTED_BINDER
     }
 };
 
index cb1dd50..583c5e3 100644 (file)
@@ -2102,7 +2102,7 @@ HRESULT RuntimeGetILFingerprintForPath(LPCWSTR path, IILFingerprint **ppFingerpr
 #endif //!DACCESS_COMPILE
 #endif //FEATURE_FUSION
 
-#if defined(FEATURE_HOSTED_BINDER) && !defined(DACCESS_COMPILE)
+#if !defined(DACCESS_COMPILE)
 PEImage * PEImage::OpenImage(
     ICLRPrivResource * pIResource,
     MDInternalImportFlags flags)
index 1f6b4ea..12a4dd7 100644 (file)
@@ -133,13 +133,11 @@ public:
 
     };
 
-#ifdef FEATURE_HOSTED_BINDER
     // pUnkResource must be one of the ICLRPrivResource* interfaces defined in CLRPrivBinding.IDL.
     // pUnkResource will be queried for each of these to find a match and 
     static PEImage * OpenImage(
         ICLRPrivResource * pIResource,
         MDInternalImportFlags flags = MDInternalImport_Default);
-#endif
 
     static PTR_PEImage FindById(UINT64 uStreamAsmId, DWORD dwModuleId);
     static PTR_PEImage FindByPath(LPCWSTR pPath);    
index 601a8bc..61da49e 100644 (file)
@@ -1880,9 +1880,7 @@ void QCALLTYPE RuntimeTypeHandle::GetTypeByNameUsingCARules(LPCWSTR pwzClassName
 
 void QCALLTYPE RuntimeTypeHandle::GetTypeByName(LPCWSTR pwzClassName, BOOL bThrowOnError, BOOL bIgnoreCase, BOOL bReflectionOnly,
                                                 QCall::StackCrawlMarkHandle pStackMark, 
-#ifdef FEATURE_HOSTED_BINDER
                                                 ICLRPrivBinder * pPrivHostBinder,
-#endif
                                                 BOOL bLoadTypeFromPartialNameHack, QCall::ObjectHandleOnStack retType,
                                                 QCall::ObjectHandleOnStack keepAlive)
 {
@@ -1897,11 +1895,8 @@ void QCALLTYPE RuntimeTypeHandle::GetTypeByName(LPCWSTR pwzClassName, BOOL bThro
 
     {
         typeHandle = TypeName::GetTypeManaged(pwzClassName, NULL, bThrowOnError, bIgnoreCase, bReflectionOnly, /*bProhibitAsmQualifiedName =*/ FALSE, pStackMark,
-                                              bLoadTypeFromPartialNameHack, (OBJECTREF*)keepAlive.m_ppObject
-#ifdef FEATURE_HOSTED_BINDER
-                                              , pPrivHostBinder
-#endif
-            );
+                                              bLoadTypeFromPartialNameHack, (OBJECTREF*)keepAlive.m_ppObject,
+                                              pPrivHostBinder);
     }
 
     if (!typeHandle.IsNull())
index ecb5c15..afe1902 100644 (file)
@@ -180,9 +180,7 @@ public:
     static
     void QCALLTYPE GetTypeByName(LPCWSTR pwzClassName, BOOL bThrowOnError, BOOL bIgnoreCase, BOOL bReflectionOnly,
                                  QCall::StackCrawlMarkHandle pStackMark, 
-#ifdef FEATURE_HOSTED_BINDER
                                  ICLRPrivBinder * pPrivHostBinder,
-#endif
                                  BOOL bLoadTypeFromPartialNameHack, QCall::ObjectHandleOnStack retType,
                                  QCall::ObjectHandleOnStack keepAlive);
 
index 8f03e3c..0b601f3 100644 (file)
@@ -1146,9 +1146,7 @@ TypeHandle TypeName::GetTypeUsingCASearchRules(LPCWSTR szTypeName, Assembly *pRe
         /*fProhibitAsmQualifiedName = */ FALSE, 
         NULL, 
         pRequestingAssembly, 
-#ifdef FEATURE_HOSTED_BINDER
         nullptr,
-#endif
         FALSE,
         &keepAlive);        
 
@@ -1189,11 +1187,8 @@ TypeHandle TypeName::GetTypeUsingCASearchRules(LPCWSTR szTypeName, Assembly *pRe
     BOOL bProhibitAsmQualifiedName,
     StackCrawlMark* pStackMark, 
     BOOL bLoadTypeFromPartialNameHack,
-    OBJECTREF *pKeepAlive
-#ifdef FEATURE_HOSTED_BINDER
-    , ICLRPrivBinder * pPrivHostBinder
-#endif
-    )
+    OBJECTREF *pKeepAlive,
+    ICLRPrivBinder * pPrivHostBinder)
 {
     STANDARD_VM_CONTRACT;
 
@@ -1242,9 +1237,7 @@ TypeHandle TypeName::GetTypeUsingCASearchRules(LPCWSTR szTypeName, Assembly *pRe
         bProhibitAsmQualifiedName, 
         pStackMark, 
         NULL, 
-#ifdef FEATURE_HOSTED_BINDER
         pPrivHostBinder,
-#endif
         bLoadTypeFromPartialNameHack,
         pKeepAlive);      
 
@@ -1275,9 +1268,7 @@ TypeHandle TypeName::GetTypeUsingCASearchRules(LPCWSTR szTypeName, Assembly *pRe
             bProhibitAsmQualifiedName, 
             pStackMark, 
             NULL, 
-#ifdef FEATURE_HOSTED_BINDER
             pPrivHostBinder,
-#endif
             bLoadTypeFromPartialNameHack,
             pKeepAlive);      
     }
@@ -1336,9 +1327,7 @@ TypeHandle TypeName::GetTypeUsingCASearchRules(LPCWSTR szTypeName, Assembly *pRe
     }
 
     return pTypeName->GetTypeWorker(bThrowIfNotFound, /*bIgnoreCase = */FALSE, pAssembly->IsIntrospectionOnly(), pAssembly, /*fEnableCASearchRules = */FALSE, FALSE, NULL, NULL, 
-#ifdef FEATURE_HOSTED_BINDER
         nullptr, // pPrivHostBinder
-#endif
         FALSE, NULL /* cannot find a collectible type unless it is in assembly */);
 
 
@@ -1410,9 +1399,7 @@ TypeHandle TypeName::GetTypeFromAsm(BOOL bForIntrospection)
         FALSE, 
         NULL, 
         NULL, 
-#ifdef FEATURE_HOSTED_BINDER
         nullptr, // pPrivHostBinder
-#endif
         FALSE, 
         NULL /* cannot find a collectible type */);
 }
@@ -1436,9 +1423,7 @@ TypeHandle TypeName::GetTypeFromAsm(BOOL bForIntrospection)
     BOOL bProhibitAsmQualifiedName,
     StackCrawlMark* pStackMark, 
     Assembly* pRequestingAssembly, 
-#ifdef FEATURE_HOSTED_BINDER
     ICLRPrivBinder * pPrivHostBinder,
-#endif
     BOOL bLoadTypeFromPartialNameHack,
     OBJECTREF *pKeepAlive)
 {
@@ -1506,9 +1491,7 @@ TypeHandle TypeName::GetTypeFromAsm(BOOL bForIntrospection)
             EX_TRY
             {
                 DomainAssembly *pDomainAssembly = LoadDomainAssembly(GetAssembly(), pRequestingAssembly, 
-#ifdef FEATURE_HOSTED_BINDER
                                                                      pPrivHostBinder,
-#endif
                                                                      bThrowIfNotFound, bIntrospectionOnly, pssOuterTypeName);
                 if (pDomainAssembly)
                 {
@@ -1524,9 +1507,7 @@ TypeHandle TypeName::GetTypeFromAsm(BOOL bForIntrospection)
         else
         {
             DomainAssembly *pDomainAssembly = LoadDomainAssembly(GetAssembly(), pRequestingAssembly, 
-#ifdef FEATURE_HOSTED_BINDER
                                                                  pPrivHostBinder,
-#endif
                                                                  bThrowIfNotFound, bIntrospectionOnly, pssOuterTypeName);
             if (pDomainAssembly)
             {
@@ -1633,9 +1614,7 @@ TypeHandle TypeName::GetTypeFromAsm(BOOL bForIntrospection)
             TypeHandle thGenericArg = m_genericArguments[i]->GetTypeWorker(
                 bThrowIfNotFound, bIgnoreCase, bIntrospectionOnly, 
                 pAssemblyGetType, fEnableCASearchRules, bProhibitAsmQualifiedName, pStackMark, pRequestingAssembly, 
-#ifdef FEATURE_HOSTED_BINDER
                 pPrivHostBinder,
-#endif
                 bLoadTypeFromPartialNameHack, 
                 (pKeepAlive != NULL) ? &gc.keepAlive : NULL /* Only pass a keepalive parameter if we were passed a keepalive parameter */);
 
@@ -1884,9 +1863,7 @@ DomainAssembly* LoadAssemblyFromPartialNameHack(SString* psszAssemblySpec, BOOL
 DomainAssembly * LoadDomainAssembly(
     SString *  psszAssemblySpec, 
     Assembly * pRequestingAssembly, 
-#ifdef FEATURE_HOSTED_BINDER
     ICLRPrivBinder * pPrivHostBinder,
-#endif
     BOOL       bThrowIfNotFound, 
     BOOL       bIntrospectionOnly, 
     SString *  pssOuterTypeName)
@@ -1915,14 +1892,11 @@ DomainAssembly * LoadDomainAssembly(
         spec.SetWindowsRuntimeType(*pssOuterTypeName);
     }
     
-#ifdef FEATURE_HOSTED_BINDER
     if (pPrivHostBinder)
     {
         spec.SetHostBinder(pPrivHostBinder);
     }
-    else 
-#endif
-    if (pRequestingAssembly && (!pRequestingAssembly->IsDomainNeutral()) && (!pRequestingAssembly->IsCollectible())) 
+    else if (pRequestingAssembly && (!pRequestingAssembly->IsDomainNeutral()) && (!pRequestingAssembly->IsCollectible())) 
     {
         GCX_PREEMP();
         spec.SetParentAssembly(pRequestingAssembly->GetDomainAssembly());
index 4b0d754..bf30730 100644 (file)
@@ -51,9 +51,7 @@ DomainAssembly* LoadAssemblyFromPartialNameHack(SString* psszAssemblySpec, BOOL
 DomainAssembly * LoadDomainAssembly(
     SString *  psszAssemblySpec, 
     Assembly * pRequestingAssembly, 
-#ifdef FEATURE_HOSTED_BINDER
     ICLRPrivBinder * pPrivHostBinder,
-#endif
     BOOL       bThrowIfNotFound, 
     BOOL       bIntrospectionOnly, 
     SString *  pssOuterTypeName);
@@ -375,11 +373,8 @@ public:
         BOOL bProhibitAssemblyQualifiedName,
         StackCrawlMark* pStackMark,
         BOOL bLoadTypeFromPartialNameHack,
-        OBJECTREF *pKeepAlive
-#ifdef FEATURE_HOSTED_BINDER
-        , ICLRPrivBinder * pPrivHostBinder = nullptr
-#endif
-        );
+        OBJECTREF *pKeepAlive,
+        ICLRPrivBinder * pPrivHostBinder = nullptr);
     
     
 public:
@@ -444,9 +439,7 @@ private:
                                     
         StackCrawlMark* pStackMark, 
         Assembly* pRequestingAssembly, 
-#ifdef FEATURE_HOSTED_BINDER
         ICLRPrivBinder * pPrivHostBinder,
-#endif
         BOOL bLoadTypeFromPartialNameHack,
         OBJECTREF *pKeepAlive);    
 
index 22af188..84a8e40 100644 (file)
@@ -55,9 +55,7 @@ private:
     friend class TypeString;
     friend SString* TypeName::ToString(SString*, BOOL, BOOL, BOOL);
     friend TypeHandle TypeName::GetTypeWorker(BOOL, BOOL, BOOL, Assembly*, BOOL, BOOL, StackCrawlMark*, Assembly*, 
-#ifdef FEATURE_HOSTED_BINDER
         ICLRPrivBinder * pPrivHostBinder,
-#endif
         BOOL, OBJECTREF *);
     HRESULT OpenGenericArguments(); 
     HRESULT CloseGenericArguments(); 
index e2182fe..a5d4708 100644 (file)
@@ -2280,7 +2280,7 @@ void Zapper::ComputeDependenciesInCurrentDomain(LPCWSTR pAssemblyString, CORCOMP
     }
     else
     {
-#if defined(FEATURE_HOSTED_BINDER) && defined(FEATURE_APPX) && !defined(FEATURE_CORECLR)
+#if defined(FEATURE_APPX) && !defined(FEATURE_CORECLR)
         if (m_pOpt->m_fAutoNGen)
         {
             // Make sure we're not been spoofed into loading an assembly that might be unsafe to load.