Remove disabled FEATURE_COMINTEROP_WINRT_DESKTOP_HOST
authordanmosemsft <danmose@microsoft.com>
Mon, 23 Jan 2017 17:45:52 +0000 (09:45 -0800)
committerdanmosemsft <danmose@microsoft.com>
Mon, 23 Jan 2017 18:28:34 +0000 (10:28 -0800)
Commit migrated from https://github.com/dotnet/coreclr/commit/66673107576ddac749509f044ab788c3dabc77e1

src/coreclr/clr.defines.targets
src/coreclr/clr.desktop.props
src/coreclr/src/mscorlib/src/System.Private.CoreLib.txt
src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/WindowsRuntimeMarshal.cs

index 267beed..3d7b800 100644 (file)
@@ -22,7 +22,6 @@
         <CDefines Condition="'$(FeatureCominteropTlbSupport)' == 'true'">$(CDefines);FEATURE_COMINTEROP_TLB_SUPPORT</CDefines>
         <CDefines Condition="'$(FeatureCominteropUnmanagedActivation)' == 'true'">$(CDefines);FEATURE_COMINTEROP_UNMANAGED_ACTIVATION</CDefines>
         <CDefines Condition="'$(FeatureCominteropWinRTManagedActivation)' == 'true'">$(CDefines);FEATURE_COMINTEROP_WINRT_MANAGED_ACTIVATION</CDefines>  <!-- Enables code required to activate managed winrt from native-->
-        <CDefines Condition="'$(FeatureCominteropWinRTDesktopHost)' == 'true'">$(CDefines);FEATURE_COMINTEROP_WINRT_DESKTOP_HOST</CDefines>
         <CDefines Condition="'$(FeatureCompressedstack)' == 'true'">$(CDefines);FEATURE_COMPRESSEDSTACK</CDefines>
         <CDefines Condition="'$(FeatureCoreFxGlobalization)' == 'true'">$(CDefines);FEATURE_COREFX_GLOBALIZATION</CDefines>
         <CDefines Condition="'$(FeatureCrypto)' == 'true'">$(CDefines);FEATURE_CRYPTO</CDefines>
         <DefineConstants Condition="'$(FeatureCominteropApartmentSupport)' == 'true'">$(DefineConstants);FEATURE_COMINTEROP_APARTMENT_SUPPORT</DefineConstants>
         <DefineConstants Condition="'$(FeatureCominteropUnmanagedActivation)' == 'true'">$(DefineConstants);FEATURE_COMINTEROP_UNMANAGED_ACTIVATION</DefineConstants>
         <DefineConstants Condition="'$(FeatureCominteropWinRTManagedActivation)' == 'true'">$(DefineConstants);FEATURE_COMINTEROP_WINRT_MANAGED_ACTIVATION</DefineConstants>
-        <DefineConstants Condition="'$(FeatureCominteropWinRTDesktopHost)' == 'true'">$(DefineConstants);FEATURE_COMINTEROP_WINRT_DESKTOP_HOST</DefineConstants>
         <DefineConstants Condition="'$(FeatureCompressedstack)' == 'true'">$(DefineConstants);FEATURE_COMPRESSEDSTACK</DefineConstants>
         <DefineConstants Condition="'$(FeatureCoreFxGlobalization)' == 'true'">$(DefineConstants);FEATURE_COREFX_GLOBALIZATION</DefineConstants>
         <DefineConstants Condition="'$(FeatureCrypto)' == 'true'">$(DefineConstants);FEATURE_CRYPTO</DefineConstants>
index 3cb33a8..bebc100 100644 (file)
@@ -20,7 +20,6 @@
     <FeatureCominteropTlbSupport>true</FeatureCominteropTlbSupport>
     <FeatureCominteropUnmanagedActivation>true</FeatureCominteropUnmanagedActivation>
     <FeatureCominteropWinRTManagedActivation>true</FeatureCominteropWinRTManagedActivation>
-    <FeatureCominteropWinRTDesktopHost>true</FeatureCominteropWinRTDesktopHost>
     <FeatureCompressedstack>true</FeatureCompressedstack>
     <FeatureCrypto>true</FeatureCrypto>
     <FeatureDbgPublish>true</FeatureDbgPublish>
index 8026892..0de8253 100644 (file)
@@ -1982,10 +1982,6 @@ WeakReference_NoLongerValid = The weak reference is no longer valid.
 Interop.COM_TypeMismatch = Type mismatch between source and destination types.
 Interop_Marshal_Unmappable_Char = Cannot marshal: Encountered unmappable character.
 
-#if FEATURE_COMINTEROP_WINRT_DESKTOP_HOST
-WinRTHostDomainName = Windows Runtime Object Host Domain for '{0}'
-#endif
-
 ;
 ; Loader Exceptions
 ;
index a7ad491..242ff75 100644 (file)
@@ -1203,42 +1203,6 @@ namespace System.Runtime.InteropServices.WindowsRuntime
             return activationFactory;
         }
 
-#if FEATURE_COMINTEROP_WINRT_DESKTOP_HOST
-        // Currently we use only a single class activator since we have a requirement that all class activations come from the same
-        // app base and we haven't sorted through the various code sharing implications of spinning up multiple AppDomains.  This
-        // holds the IWinRTClassActivator* that is used for the process
-        private static IntPtr s_pClassActivator = IntPtr.Zero;
-
-        internal static IntPtr GetClassActivatorForApplication(string appBase)
-        {
-            if (s_pClassActivator == IntPtr.Zero)
-            {
-                AppDomainSetup hostDomainSetup = new AppDomainSetup()
-                {
-                    ApplicationBase = appBase,
-                };
-
-                AppDomain hostDomain = AppDomain.CreateDomain(Environment.GetResourceString("WinRTHostDomainName", appBase), null, hostDomainSetup);
-                WinRTClassActivator activator = (WinRTClassActivator)hostDomain.CreateInstanceAndUnwrap(typeof(WinRTClassActivator).Assembly.FullName, typeof(WinRTClassActivator).FullName);
-                IntPtr pActivator = activator.GetIWinRTClassActivator();
-
-                if (Interlocked.CompareExchange(ref s_pClassActivator, pActivator, IntPtr.Zero) != IntPtr.Zero)
-                {
-                    Marshal.Release(pActivator);
-                    activator = null;
-
-                    try
-                    {
-                        AppDomain.Unload(hostDomain);
-                    }
-                    catch (CannotUnloadAppDomainException) { }
-                }
-            }
-
-            Marshal.AddRef(s_pClassActivator);
-            return s_pClassActivator;
-        }
-#endif // FEATURE_COMINTEROP_WINRT_DESKTOP_HOST
 
 #endif // FEATURE_COMINTEROP_WINRT_MANAGED_ACTIVATION