diff options
author | danmosemsft <danmose@microsoft.com> | 2017-02-12 14:23:34 -0800 |
---|---|---|
committer | danmosemsft <danmose@microsoft.com> | 2017-02-12 16:58:49 -0800 |
commit | e14f9e5a6eacdc1ae0ff51a23d192cf457f7f5cc (patch) | |
tree | 2be3c90b85f91c1567c3a36b44d517115eadde30 | |
parent | c2ef095b02c2751f304f43d4c529a1fbac6079d2 (diff) | |
download | coreclr-e14f9e5a6eacdc1ae0ff51a23d192cf457f7f5cc.tar.gz coreclr-e14f9e5a6eacdc1ae0ff51a23d192cf457f7f5cc.tar.bz2 coreclr-e14f9e5a6eacdc1ae0ff51a23d192cf457f7f5cc.zip |
Remove never defined FEATURE_COMINTEROP_WINRT_DESKTOP_HOST
-rw-r--r-- | src/vm/clrprivbinderwinrt.cpp | 87 | ||||
-rw-r--r-- | src/vm/clrprivbinderwinrt.h | 11 | ||||
-rw-r--r-- | src/vm/corhost.cpp | 58 | ||||
-rw-r--r-- | src/vm/mscorlib.h | 3 |
4 files changed, 0 insertions, 159 deletions
diff --git a/src/vm/clrprivbinderwinrt.cpp b/src/vm/clrprivbinderwinrt.cpp index c98317bb20..6f6a608e53 100644 --- a/src/vm/clrprivbinderwinrt.cpp +++ b/src/vm/clrprivbinderwinrt.cpp @@ -135,9 +135,6 @@ CLRPrivBinderWinRT::CLRPrivBinderWinRT( , m_fNamespaceResolutionKind(fNamespaceResolutionKind) , m_pApplicationContext(nullptr) , m_appLocalWinMDPath(nullptr) -#ifdef FEATURE_COMINTEROP_WINRT_DESKTOP_HOST - , m_fCanSetLocalWinMDPath(TRUE) -#endif // FEATURE_COMINTEROP_WINRT_DESKTOP_HOST { STANDARD_VM_CONTRACT; PRECONDITION(CheckPointer(pWinRtTypeCache)); @@ -153,9 +150,6 @@ CLRPrivBinderWinRT::CLRPrivBinderWinRT( INDEBUG(| CRST_DEBUG_ONLY_CHECK_FORBID_SUSPEND_THREAD))); m_MapsAddLock.Init(CrstCLRPrivBinderMapsAdd); -#ifdef FEATURE_COMINTEROP_WINRT_DESKTOP_HOST - m_localWinMDPathLock.Init(CrstCrstCLRPrivBinderLocalWinMDPath); -#endif // FEATURE_COMINTEROP_WINRT_DESKTOP_HOST // Copy altpaths if (cAltPaths > 0) @@ -471,38 +465,6 @@ HRESULT CLRPrivBinderWinRT::BindAssemblyToNativeAssembly(CLRPrivAssemblyWinRT *p } #endif -#if defined(FEATURE_COMINTEROP_WINRT_DESKTOP_HOST) && !defined(CROSSGEN_COMPILE) -BOOL CLRPrivBinderWinRT::SetLocalWinMDPath(HSTRING localWinMDPath) -{ - STANDARD_VM_CONTRACT; - STATIC_CONTRACT_CAN_TAKE_LOCK; - - CrstHolder lock(&m_localWinMDPathLock); - - // We use the empty string as a sential, so don't allow explicitly setting the binding base to empty. - if (localWinMDPath == nullptr) - { - return FALSE; - } - - // If we've already set a binding base, then the current base must match the exisitng one exactly - if (!m_localWinMDPath.IsEmpty()) - { - return m_localWinMDPath.CompareOrdinal(clr::winrt::StringReference(localWinMDPath)) == 0; - } - - // If we've already done WinRT binding, we can't set the binding base because that could lead to inconsistent results when binding - // the same name after the base is set. - if (!m_fCanSetLocalWinMDPath) - { - return FALSE; - } - - m_localWinMDPath.Initialize(localWinMDPath); - - return TRUE; -} -#endif // FEATURE_COMINTEROP_WINRT_DESKTOP_HOST && !CROSSGEN_COMPILE //===================================================================================================================== HRESULT CLRPrivBinderWinRT::BindWinRTAssemblyByName( @@ -854,55 +816,6 @@ CLRPrivBinderWinRT::GetFileNameListForNamespace( } } -#ifdef FEATURE_COMINTEROP_WINRT_DESKTOP_HOST - // If we failed to find the requested name, but we have an application local probing path setup, then - // we can use that to try to find the name now. - if (hr == RO_E_METADATA_NAME_NOT_FOUND || hr == HRESULT_FROM_WIN32(APPMODEL_ERROR_NO_PACKAGE)) - { - // We only want to probe the application local path for 3rd party WinMDs as these are the only ones - // which do not have code sharing enabled. Although we currently only allow a single alternate probing - // path per process, shutting this off now will give us easier behavior to support in the future if we - // do need to enable per-domain local paths. - if (!IsWindowsNamespace(wszNamespaceRoResolve)) - { - HSTRING localWinMDPath = nullptr; - { - CrstHolder lock(&m_localWinMDPathLock); - - localWinMDPath = m_localWinMDPath.Get(); - - // If the host has not configured the local winmd path, and we have not yet done any winmd probing - // then see if we have config to setup a local winmd path. - if (localWinMDPath == nullptr && m_fCanSetLocalWinMDPath) - { - NewArrayHolder<WCHAR> configWinMDPath(CLRConfig::GetConfigValue(CLRConfig::INTERNAL_LocalWinMDPath)); - if (!configWinMDPath.IsNull()) - { - m_localWinMDPath.Initialize(configWinMDPath); - localWinMDPath = m_localWinMDPath.Get(); - } - } - - // Do not allow any further setting of the application binding base at this point, since if it - // is not currently set, setting it in the future could result in different binding results. - m_fCanSetLocalWinMDPath = FALSE; - } - - if (localWinMDPath != nullptr) - { - hr = RoResolveNamespace( - WinRtStringRef(wszNamespaceRoResolve, cchNamespaceRoResolve), - wszWinMDPath != nullptr ? (HSTRING)WinRtStringRef(wszWinMDPath, cchWinMDPath) : nullptr, // hsWindowsSdkPath - 1, // cPackageGraph - &localWinMDPath, // rgPackageGraph - &cFileNames, - &rgFileNames, - nullptr, // pcDirectNamespaceChildren - nullptr); // rgDirectNamespaceChildren - } - } - } -#endif // FEATURE_COMINTEROP_WINRT_DESKTOP_HOST IfFailRet(hr); if (hr != S_OK) diff --git a/src/vm/clrprivbinderwinrt.h b/src/vm/clrprivbinderwinrt.h index 34f8ef7a09..f8e3cad977 100644 --- a/src/vm/clrprivbinderwinrt.h +++ b/src/vm/clrprivbinderwinrt.h @@ -251,9 +251,6 @@ public: LPCUTF8 szNamespace, LPCUTF8 szClassName); -#if defined(FEATURE_COMINTEROP_WINRT_DESKTOP_HOST) && !defined(CROSSGEN_COMPILE) - BOOL SetLocalWinMDPath(HSTRING localWinMDPath); -#endif // FEATURE_COMINTEROP_WINRT_DESKTOP_HOST && !CROSSGEN_COMPILE private: //============================================================================================= @@ -330,14 +327,6 @@ private: BINDER_SPACE::ApplicationContext * m_pApplicationContext; NewArrayHolder<WCHAR> m_appLocalWinMDPath; -#ifdef FEATURE_COMINTEROP_WINRT_DESKTOP_HOST - // App-local location that can be probed for WinMD files - BOOL m_fCanSetLocalWinMDPath; - CrstExplicitInit m_localWinMDPathLock; -#ifndef CROSSGEN_COMPILE - clr::winrt::String m_localWinMDPath; -#endif // !CROSSGEN_COMPILE -#endif // FEATURE_COMINTEROP_WINRT_DESKTOP_HOST }; // class CLRPrivBinderWinRT diff --git a/src/vm/corhost.cpp b/src/vm/corhost.cpp index 26bb237363..8b27799b44 100644 --- a/src/vm/corhost.cpp +++ b/src/vm/corhost.cpp @@ -5224,64 +5224,6 @@ HRESULT STDMETHODCALLTYPE DllGetActivationFactoryImpl(LPCWSTR wszAssemblyName, #endif // !FEATURE_COMINTEROP_MANAGED_ACTIVATION -#ifdef FEATURE_COMINTEROP_WINRT_DESKTOP_HOST - -HRESULT STDMETHODCALLTYPE GetClassActivatorForApplicationImpl(HSTRING appPath, IWinRTClassActivator** ppActivator) -{ - CONTRACTL - { - DISABLED(NOTHROW); - GC_TRIGGERS; - MODE_ANY; - ENTRY_POINT; - } - CONTRACTL_END; - - HRESULT hr = S_OK; - - BEGIN_ENTRYPOINT_NOTHROW; - BEGIN_EXTERNAL_ENTRYPOINT(&hr); - { - if (GetAppDomain()->GetWinRtBinder()->SetLocalWinMDPath(appPath)) - { - GCX_COOP(); - - struct - { - STRINGREF appbase; - } gc; - ZeroMemory(&gc, sizeof(gc)); - GCPROTECT_BEGIN(gc); - - UINT32 appPathLength = 0; - PCWSTR wszAppPath = WindowsGetStringRawBuffer(appPath, &appPathLength); - - gc.appbase = StringObject::NewString(wszAppPath, appPathLength); - - MethodDescCallSite getClassActivator(METHOD__WINDOWSRUNTIMEMARSHAL__GET_CLASS_ACTIVATOR_FOR_APPLICATION); - - ARG_SLOT args[] = - { - ObjToArgSlot(gc.appbase) - }; - - IWinRTClassActivator* pActivator = reinterpret_cast<IWinRTClassActivator *>(getClassActivator.Call_RetLPVOID(args)); - *ppActivator = pActivator; - - GCPROTECT_END(); - } - else - { - hr = CO_E_BAD_PATH; - } - } - END_EXTERNAL_ENTRYPOINT; - END_ENTRYPOINT_NOTHROW; - - return hr; -} - -#endif // FEATURE_COMINTEROP_WINRT_DESKTOP_HOST #endif // !DACCESS_COMPILE diff --git a/src/vm/mscorlib.h b/src/vm/mscorlib.h index d11e0f8364..c4fd43d6d7 100644 --- a/src/vm/mscorlib.h +++ b/src/vm/mscorlib.h @@ -1415,9 +1415,6 @@ DEFINE_METHOD(BUFFER, MEMCPY, Memcpy, DEFINE_CLASS(WINDOWSRUNTIMEMARSHAL, WinRT, WindowsRuntimeMarshal) #ifdef FEATURE_COMINTEROP_WINRT_MANAGED_ACTIVATION DEFINE_METHOD(WINDOWSRUNTIMEMARSHAL, GET_ACTIVATION_FACTORY_FOR_TYPE, GetActivationFactoryForType, SM_Type_RetIntPtr) -#ifdef FEATURE_COMINTEROP_WINRT_DESKTOP_HOST -DEFINE_METHOD(WINDOWSRUNTIMEMARSHAL, GET_CLASS_ACTIVATOR_FOR_APPLICATION, GetClassActivatorForApplication, SM_Str_RetIntPtr) -#endif // FEATURE_COMINTEROP_WINRT_DESKTOP_HOST #endif // FEATURE_COMINTEROP_WINRT_MANAGED_ACTIVATION DEFINE_CLASS(IACTIVATIONFACTORY, WinRT, IActivationFactory) |