From 51e968b013e9b1582035f202e004ed024f747f4f Mon Sep 17 00:00:00 2001 From: Austin Wise Date: Sun, 5 Mar 2017 17:51:40 -0800 Subject: Remove hosting methods that always return false (#9930) * Remove CLRIoCompletionHosted as it always returns false. * Remove CLRSyncHosted as it always returns false. * Remove CLRMemoryHosted as it always returns false. * Remove CLRTaskHosted as it always returns false. * Remove CLRAssemblyHosted, CLRGCHosted,and CLRSecurityHosted. They are not called. * Remove IsThreadPoolHosted as it always returns false. * Remove EnterRuntime and LeaveRuntime, as they do nothing. * Add back calls to RevertIfImpersonated and GCX_PREEMP. I accidentally deleted the call to RevertIfImpersonated instead of just removing an extra parameter. When I removed the HR_LEAVE_RUNTIME_HOLDER macro from windowsruntime.h, I not only removed a LeaveRuntimeHolder but also a GCX_PREEMP. So I added it back. The holder and GCX_PREEMP where only inserted when the FEATURE_LEAVE_RUNTIME_HOLDER macro was defined. Since it is always defined, I removed it. Also as I understand it, you would always want to have a GCX_PREEMP before calling into the Windows API as not to block the GC, so I'm not sure why you would want to disable it. --- src/debug/daccess/dacdbiimpl.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/debug/daccess/dacdbiimpl.cpp') diff --git a/src/debug/daccess/dacdbiimpl.cpp b/src/debug/daccess/dacdbiimpl.cpp index 6618eb57b9..c7595c46c1 100644 --- a/src/debug/daccess/dacdbiimpl.cpp +++ b/src/debug/daccess/dacdbiimpl.cpp @@ -4748,14 +4748,7 @@ DWORD DacDbiInterfaceImpl::GetUniqueThreadID(VMPTR_Thread vmThread) Thread * pThread = vmThread.GetDacPtr(); _ASSERTE(pThread != NULL); - if (CLRTaskHosted()) - { - return pThread->GetThreadId(); - } - else - { - return pThread->GetOSThreadId(); - } + return pThread->GetOSThreadId(); } // Return the object handle to the managed Exception object of the current exception -- cgit v1.2.3