Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Remove FEATURE_HOSTED_BINDER definition (#4838)
Browse files Browse the repository at this point in the history
The FEATURE_HOSTED_BINDER is always on so remove it from all the sources.
  • Loading branch information
janvorli committed May 7, 2016
1 parent 0ef1fc9 commit 29fcfe2
Show file tree
Hide file tree
Showing 45 changed files with 81 additions and 347 deletions.
1 change: 0 additions & 1 deletion clr.coreclr.props
Expand Up @@ -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>
Expand Down
2 changes: 0 additions & 2 deletions clr.defines.targets
Expand Up @@ -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>
Expand Down Expand Up @@ -159,7 +158,6 @@
<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>
Expand Down
1 change: 0 additions & 1 deletion clr.desktop.props
Expand Up @@ -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>
Expand Down
1 change: 0 additions & 1 deletion clrdefinitions.cmake
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/debug/daccess/stdafx.h
Expand Up @@ -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>
Expand Down
4 changes: 0 additions & 4 deletions src/dlls/mscoree/mscoree.cpp
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
Expand Down
16 changes: 4 additions & 12 deletions src/inc/corhost.h
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -859,7 +855,7 @@ class CorHost2 :

#endif // !FEATURE_CORECLR

#if defined(FEATURE_HOSTED_BINDER) && !defined(FEATURE_CORECLR)
#if !defined(FEATURE_CORECLR)
/**********************************************************************************
** ICLRPrivRuntime Methods
**********************************************************************************/
Expand All @@ -884,7 +880,7 @@ class CorHost2 :
ICLRPrivBinder * pBinder,
int * pRetVal);

#endif // FEATURE_HOSTED_BINDER && !FEATURE_CORECLR
#endif // !FEATURE_CORECLR

static IHostControl *GetHostControl ()
{
Expand Down Expand Up @@ -1082,7 +1078,6 @@ class CorHost2 :

#endif // FEATURE_CORECLR

#if defined(FEATURE_CORECLR) || defined(FEATURE_HOSTED_BINDER)
// Helpers for both ICLRRuntimeHost2 and ICLRPrivRuntime
HRESULT _CreateAppDomain(
LPCWSTR wszFriendlyName,
Expand All @@ -1092,7 +1087,7 @@ class CorHost2 :
int nProperties,
LPCWSTR* pPropertyNames,
LPCWSTR* pPropertyValues,
#if defined(FEATURE_HOSTED_BINDER) && !defined(FEATURE_CORECLR)
#if !defined(FEATURE_CORECLR)
ICLRPrivBinder* pBinder,
#endif
DWORD* pAppDomainID);
Expand All @@ -1103,12 +1098,9 @@ class CorHost2 :
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;

Expand Down
4 changes: 2 additions & 2 deletions src/inc/dacvars.h
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/inc/holder.h
Expand Up @@ -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

Expand Down
4 changes: 0 additions & 4 deletions src/md/compiler/classfactory.cpp
Expand Up @@ -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);

Expand All @@ -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 }
Expand Down
42 changes: 4 additions & 38 deletions src/mscorlib/src/System/Reflection/Assembly.cs
Expand Up @@ -1593,8 +1593,7 @@ public override IList<CustomAttributeData> GetCustomAttributesData()
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,
Expand All @@ -1603,15 +1602,13 @@ public override IList<CustomAttributeData> GetCustomAttributesData()
{
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;
Expand All @@ -1623,9 +1620,7 @@ public override IList<CustomAttributeData> GetCustomAttributesData()
}

return InternalLoadAssemblyName(an, assemblySecurity, null, ref stackMark,
#if FEATURE_HOSTED_BINDER
pPrivHostBinder,
#endif
true /*thrownOnFileNotFound*/, forIntrospection, false /* suppressSecurityChecks */);
}

Expand Down Expand Up @@ -1655,8 +1650,7 @@ public override IList<CustomAttributeData> GetCustomAttributesData()
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,
Expand All @@ -1669,17 +1663,14 @@ public override IList<CustomAttributeData> GetCustomAttributesData()
{
return InternalLoadAssemblyName(assemblyRef, assemblySecurity, reqAssembly, ref stackMark, IntPtr.Zero, true /*throwOnError*/, forIntrospection, suppressSecurityChecks);
}
#endif

[System.Security.SecurityCritical] // auto-generated
internal static RuntimeAssembly InternalLoadAssemblyName(
AssemblyName assemblyRef,
Evidence assemblySecurity,
RuntimeAssembly reqAssembly,
ref StackCrawlMark stackMark,
#if FEATURE_HOSTED_BINDER
IntPtr pPrivHostBinder,
#endif
bool throwOnFileNotFound,
bool forIntrospection,
bool suppressSecurityChecks)
Expand Down Expand Up @@ -1739,9 +1730,7 @@ public override IList<CustomAttributeData> GetCustomAttributesData()
}

return nLoad(assemblyRef, codeBase, assemblySecurity, reqAssembly, ref stackMark,
#if FEATURE_HOSTED_BINDER
pPrivHostBinder,
#endif
throwOnFileNotFound, forIntrospection, suppressSecurityChecks);
}

Expand Down Expand Up @@ -1788,11 +1777,8 @@ private bool IsDesignerBindingContext()
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);
Expand All @@ -1814,17 +1800,13 @@ private bool IsDesignerBindingContext()
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);
}

Expand Down Expand Up @@ -1861,9 +1843,7 @@ private static unsafe RuntimeAssembly LoadWithPartialNameHack(String partialName
// 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;
Expand Down Expand Up @@ -1897,9 +1877,7 @@ internal static RuntimeAssembly LoadWithPartialNameInternal(AssemblyName an, Evi
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) {
Expand All @@ -1923,9 +1901,7 @@ internal static RuntimeAssembly LoadWithPartialNameInternal(AssemblyName an, Evi
{
an.Version = null;
result = nLoad(an, null, securityEvidence, null, ref stackMark,
#if FEATURE_HOSTED_BINDER
IntPtr.Zero,
#endif
false, false, false);
}
}
Expand Down Expand Up @@ -2788,9 +2764,7 @@ public override Assembly GetSatelliteAssembly(CultureInfo culture, Version versi
{
// 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);
}
}
Expand Down Expand Up @@ -2818,9 +2792,7 @@ public override Assembly GetSatelliteAssembly(CultureInfo culture, Version versi
else if (!bIsAppXDevMode)
{
retAssembly = nLoad(an, null, null, this, ref stackMark,
#if FEATURE_HOSTED_BINDER
IntPtr.Zero,
#endif
throwOnFileNotFound, false, false);
}
}
Expand All @@ -2829,9 +2801,7 @@ public override Assembly GetSatelliteAssembly(CultureInfo culture, Version versi
#endif // !FEATURE_CORECLR
{
retAssembly = nLoad(an, null, null, this, ref stackMark,
#if FEATURE_HOSTED_BINDER
IntPtr.Zero,
#endif
throwOnFileNotFound, false, false);
}

Expand Down Expand Up @@ -2890,9 +2860,7 @@ public override Assembly GetSatelliteAssembly(CultureInfo culture, Version versi
{
retAssembly = useLoadFile ? nLoadFile(fileNameOrCodeBase, null) :
nLoad(loadFromAsmName, fileNameOrCodeBase, null, this, ref stackMark,
#if FEATURE_HOSTED_BINDER
IntPtr.Zero,
#endif
throwOnFileNotFound, false, false);
}
catch (FileNotFoundException)
Expand Down Expand Up @@ -2923,9 +2891,7 @@ public override Assembly GetSatelliteAssembly(CultureInfo culture, Version versi
{
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);

}
Expand Down

0 comments on commit 29fcfe2

Please sign in to comment.