From f51a778f06bd6b29261bfb12779db507a3276693 Mon Sep 17 00:00:00 2001 From: Aditya Mandaleeka Date: Thu, 13 Apr 2017 19:19:58 -0700 Subject: [PATCH] Rename IGCHandleTable to IGCHandleManager. Commit migrated from https://github.com/dotnet/coreclr/commit/c9914b7ab9dfcc7ad8003368715a182d7cbbe289 --- src/coreclr/src/gc/gc.h | 6 +- src/coreclr/src/gc/gccommon.cpp | 12 ++-- src/coreclr/src/gc/gchandletable.cpp | 26 ++++---- src/coreclr/src/gc/gchandletableimpl.h | 2 +- src/coreclr/src/gc/gcinterface.h | 6 +- src/coreclr/src/gc/sample/GCSample.cpp | 8 +-- src/coreclr/src/vm/appdomain.cpp | 8 +-- src/coreclr/src/vm/appdomain.hpp | 2 +- src/coreclr/src/vm/ceemain.cpp | 10 +-- ...chandletableutilities.h => gchandleutilities.h} | 72 +++++++++++----------- src/coreclr/src/vm/gcheaputilities.cpp | 6 +- src/coreclr/src/vm/threads.cpp | 2 +- src/coreclr/src/vm/threads.h | 2 +- 13 files changed, 81 insertions(+), 81 deletions(-) rename src/coreclr/src/vm/{gchandletableutilities.h => gchandleutilities.h} (71%) diff --git a/src/coreclr/src/gc/gc.h b/src/coreclr/src/gc/gc.h index a661c31..07ae6c9 100644 --- a/src/coreclr/src/gc/gc.h +++ b/src/coreclr/src/gc/gc.h @@ -115,7 +115,7 @@ extern "C" GCHeapType g_gc_heap_type; extern "C" uint32_t g_max_generation; extern "C" MethodTable* g_gc_pFreeObjectMethodTable; -::IGCHandleTable* CreateGCHandleTable(); +::IGCHandleManager* CreateGCHandleManager(); namespace WKS { ::IGCHeapInternal* CreateGCHeap(); @@ -260,8 +260,8 @@ void updateGCShadow(Object** ptr, Object* val); // The single GC heap instance, shared with the VM. extern IGCHeapInternal* g_theGCHeap; -// The single GC handle table instance, shared with the VM. -extern IGCHandleTable* g_theGCHandleTable; +// The single GC handle manager instance, shared with the VM. +extern IGCHandleManager* g_theGCHandleManager; #ifndef DACCESS_COMPILE inline bool IsGCInProgress(bool bConsiderGCStart = false) diff --git a/src/coreclr/src/gc/gccommon.cpp b/src/coreclr/src/gc/gccommon.cpp index f931597..4950809c 100644 --- a/src/coreclr/src/gc/gccommon.cpp +++ b/src/coreclr/src/gc/gccommon.cpp @@ -15,7 +15,7 @@ #include "gc.h" IGCHeapInternal* g_theGCHeap; -IGCHandleTable* g_theGCHandleTable; +IGCHandleManager* g_theGCHandleManager; #ifdef FEATURE_STANDALONE_GC IGCToCLR* g_theGCToCLR; @@ -143,7 +143,7 @@ namespace SVR extern void PopulateDacVars(GcDacVars* dacVars); } -bool InitializeGarbageCollector(IGCToCLR* clrToGC, IGCHeap** gcHeap, IGCHandleTable** gcHandleTable, GcDacVars* gcDacVars) +bool InitializeGarbageCollector(IGCToCLR* clrToGC, IGCHeap** gcHeap, IGCHandleManager** gcHandleManager, GcDacVars* gcDacVars) { LIMITED_METHOD_CONTRACT; @@ -151,10 +151,10 @@ bool InitializeGarbageCollector(IGCToCLR* clrToGC, IGCHeap** gcHeap, IGCHandleTa assert(gcDacVars != nullptr); assert(gcHeap != nullptr); - assert(gcHandleTable != nullptr); + assert(gcHandleManager != nullptr); - IGCHandleTable* handleTable = CreateGCHandleTable(); - if (handleTable == nullptr) + IGCHandleManager* handleManager = CreateGCHandleManager(); + if (handleManager == nullptr) { return false; } @@ -192,7 +192,7 @@ bool InitializeGarbageCollector(IGCToCLR* clrToGC, IGCHeap** gcHeap, IGCHandleTa assert(clrToGC == nullptr); #endif - *gcHandleTable = handleTable; + *gcHandleManager = handleManager; *gcHeap = heap; return true; } diff --git a/src/coreclr/src/gc/gchandletable.cpp b/src/coreclr/src/gc/gchandletable.cpp index 5a637d4..6c9e098 100644 --- a/src/coreclr/src/gc/gchandletable.cpp +++ b/src/coreclr/src/gc/gchandletable.cpp @@ -10,9 +10,9 @@ GCHandleStore* g_gcGlobalHandleStore; -IGCHandleTable* CreateGCHandleTable() +IGCHandleManager* CreateGCHandleManager() { - return new (nothrow) GCHandleTable(); + return new (nothrow) GCHandleManager(); } void GCHandleStore::Uproot() @@ -57,22 +57,22 @@ GCHandleStore::~GCHandleStore() Ref_DestroyHandleTableBucket(_underlyingBucket); } -bool GCHandleTable::Initialize() +bool GCHandleManager::Initialize() { return Ref_Initialize(); } -void GCHandleTable::Shutdown() +void GCHandleManager::Shutdown() { Ref_Shutdown(); } -IGCHandleStore* GCHandleTable::GetGlobalHandleStore() +IGCHandleStore* GCHandleManager::GetGlobalHandleStore() { return g_gcGlobalHandleStore; } -IGCHandleStore* GCHandleTable::CreateHandleStore(void* context) +IGCHandleStore* GCHandleManager::CreateHandleStore(void* context) { #ifndef FEATURE_REDHAWK HandleTableBucket* newBucket = ::Ref_CreateHandleTableBucket(ADIndex((DWORD)(uintptr_t)context)); @@ -83,37 +83,37 @@ IGCHandleStore* GCHandleTable::CreateHandleStore(void* context) #endif } -void GCHandleTable::DestroyHandleStore(IGCHandleStore* store) +void GCHandleManager::DestroyHandleStore(IGCHandleStore* store) { delete store; } -void* GCHandleTable::GetHandleContext(OBJECTHANDLE handle) +void* GCHandleManager::GetHandleContext(OBJECTHANDLE handle) { return (void*)((uintptr_t)::HndGetHandleTableADIndex(::HndGetHandleTable(handle)).m_dwIndex); } -OBJECTHANDLE GCHandleTable::CreateGlobalHandleOfType(Object* object, int type) +OBJECTHANDLE GCHandleManager::CreateGlobalHandleOfType(Object* object, int type) { return ::HndCreateHandle(g_HandleTableMap.pBuckets[0]->pTable[GetCurrentThreadHomeHeapNumber()], type, ObjectToOBJECTREF(object)); } -OBJECTHANDLE GCHandleTable::CreateDuplicateHandle(OBJECTHANDLE handle) +OBJECTHANDLE GCHandleManager::CreateDuplicateHandle(OBJECTHANDLE handle) { return ::HndCreateHandle(HndGetHandleTable(handle), HNDTYPE_DEFAULT, ::HndFetchHandle(handle)); } -void GCHandleTable::DestroyHandleOfType(OBJECTHANDLE handle, int type) +void GCHandleManager::DestroyHandleOfType(OBJECTHANDLE handle, int type) { ::HndDestroyHandle(::HndGetHandleTable(handle), type, handle); } -void GCHandleTable::DestroyHandleOfUnknownType(OBJECTHANDLE handle) +void GCHandleManager::DestroyHandleOfUnknownType(OBJECTHANDLE handle) { ::HndDestroyHandleOfUnknownType(::HndGetHandleTable(handle), handle); } -void* GCHandleTable::GetExtraInfoFromHandle(OBJECTHANDLE handle) +void* GCHandleManager::GetExtraInfoFromHandle(OBJECTHANDLE handle) { return (void*)::HndGetHandleExtraInfo(handle); } diff --git a/src/coreclr/src/gc/gchandletableimpl.h b/src/coreclr/src/gc/gchandletableimpl.h index 1635c6e..bd9d921 100644 --- a/src/coreclr/src/gc/gchandletableimpl.h +++ b/src/coreclr/src/gc/gchandletableimpl.h @@ -35,7 +35,7 @@ private: extern GCHandleStore* g_gcGlobalHandleStore; -class GCHandleTable : public IGCHandleTable +class GCHandleManager : public IGCHandleManager { public: virtual bool Initialize(); diff --git a/src/coreclr/src/gc/gcinterface.h b/src/coreclr/src/gc/gcinterface.h index e4311fa..28dc801 100644 --- a/src/coreclr/src/gc/gcinterface.h +++ b/src/coreclr/src/gc/gcinterface.h @@ -169,12 +169,12 @@ struct segment_info class Object; class IGCHeap; -class IGCHandleTable; +class IGCHandleManager; // Initializes the garbage collector. Should only be called // once, during EE startup. Returns true if the initialization // was successful, false otherwise. -bool InitializeGarbageCollector(IGCToCLR* clrToGC, IGCHeap** gcHeap, IGCHandleTable** gcHandleTable, GcDacVars* gcDacVars); +bool InitializeGarbageCollector(IGCToCLR* clrToGC, IGCHeap** gcHeap, IGCHandleManager** gcHandleTable, GcDacVars* gcDacVars); // The runtime needs to know whether we're using workstation or server GC // long before the GCHeap is created. This function sets the type of @@ -420,7 +420,7 @@ public: virtual ~IGCHandleStore() {}; }; -class IGCHandleTable { +class IGCHandleManager { public: virtual bool Initialize() = 0; diff --git a/src/coreclr/src/gc/sample/GCSample.cpp b/src/coreclr/src/gc/sample/GCSample.cpp index 2914ee1..0a771b7 100644 --- a/src/coreclr/src/gc/sample/GCSample.cpp +++ b/src/coreclr/src/gc/sample/GCSample.cpp @@ -130,8 +130,8 @@ int __cdecl main(int argc, char* argv[]) // GcDacVars dacVars; IGCHeap *pGCHeap; - IGCHandleTable *pGCHandleTable; - if (!InitializeGarbageCollector(nullptr, &pGCHeap, &pGCHandleTable, &dacVars)) + IGCHandleManager *pGCHandleManager; + if (!InitializeGarbageCollector(nullptr, &pGCHeap, &pGCHandleManager, &dacVars)) { return -1; } @@ -140,9 +140,9 @@ int __cdecl main(int argc, char* argv[]) return -1; // - // Initialize handle table + // Initialize handle manager // - if (!pGCHandleTable->Initialize()) + if (!pGCHandleManager->Initialize()) return -1; // diff --git a/src/coreclr/src/vm/appdomain.cpp b/src/coreclr/src/vm/appdomain.cpp index 3f7fd90..942d11b 100644 --- a/src/coreclr/src/vm/appdomain.cpp +++ b/src/coreclr/src/vm/appdomain.cpp @@ -741,7 +741,7 @@ BaseDomain::BaseDomain() #ifndef CROSSGEN_COMPILE // Note that m_handleStore is overridden by app domains - m_handleStore = GCHandleTableUtilities::GetGCHandleTable()->GetGlobalHandleStore(); + m_handleStore = GCHandleUtilities::GetGCHandleManager()->GetGlobalHandleStore(); #else m_handleStore = NULL; #endif @@ -4273,11 +4273,11 @@ void AppDomain::Init() // default domain cannot be unloaded. if (GetId().m_dwId == DefaultADID) { - m_handleStore = GCHandleTableUtilities::GetGCHandleTable()->GetGlobalHandleStore(); + m_handleStore = GCHandleUtilities::GetGCHandleManager()->GetGlobalHandleStore(); } else { - m_handleStore = GCHandleTableUtilities::GetGCHandleTable()->CreateHandleStore((void*)(uintptr_t)m_dwIndex.m_dwIndex); + m_handleStore = GCHandleUtilities::GetGCHandleManager()->CreateHandleStore((void*)(uintptr_t)m_dwIndex.m_dwIndex); } #endif // CROSSGEN_COMPILE @@ -4580,7 +4580,7 @@ void AppDomain::Terminate() if (m_handleStore) { - GCHandleTableUtilities::GetGCHandleTable()->DestroyHandleStore(m_handleStore); + GCHandleUtilities::GetGCHandleManager()->DestroyHandleStore(m_handleStore); m_handleStore = NULL; } diff --git a/src/coreclr/src/vm/appdomain.hpp b/src/coreclr/src/vm/appdomain.hpp index 3b66435..101524f 100644 --- a/src/coreclr/src/vm/appdomain.hpp +++ b/src/coreclr/src/vm/appdomain.hpp @@ -28,7 +28,7 @@ #include "ilstubcache.h" #include "testhookmgr.h" #include "gcheaputilities.h" -#include "gchandletableutilities.h" +#include "gchandleutilities.h" #include "../binder/inc/applicationcontext.hpp" #include "rejit.h" diff --git a/src/coreclr/src/vm/ceemain.cpp b/src/coreclr/src/vm/ceemain.cpp index 6b0c0df..22f1152 100644 --- a/src/coreclr/src/vm/ceemain.cpp +++ b/src/coreclr/src/vm/ceemain.cpp @@ -869,7 +869,7 @@ void EEStartupHelper(COINITIEE fFlags) // Initialize remoting - if (!GCHandleTableUtilities::GetGCHandleTable()->Initialize()) + if (!GCHandleUtilities::GetGCHandleManager()->Initialize()) { IfFailGo(E_OUTOFMEMORY); } @@ -1880,7 +1880,7 @@ part2: #ifdef SHOULD_WE_CLEANUP if (!g_fFastExitProcess) { - GCHandleTableUtilities::GetGCHandleTable()->Shutdown(); + GCHandleUtilities::GetGCHandleManager()->Shutdown(); } #endif /* SHOULD_WE_CLEANUP */ @@ -2483,17 +2483,17 @@ void InitializeGarbageCollector() IGCToCLR* gcToClr = nullptr; #endif - IGCHandleTable *pGcHandleTable; + IGCHandleManager *pGcHandleManager; IGCHeap *pGCHeap; - if (!InitializeGarbageCollector(gcToClr, &pGCHeap, &pGcHandleTable, &g_gc_dac_vars)) + if (!InitializeGarbageCollector(gcToClr, &pGCHeap, &pGcHandleManager, &g_gc_dac_vars)) { ThrowOutOfMemory(); } assert(pGCHeap != nullptr); g_pGCHeap = pGCHeap; - g_pGCHandleTable = pGcHandleTable; + g_pGCHandleManager = pGcHandleManager; g_gcDacGlobals = &g_gc_dac_vars; // Apparently the Windows linker removes global variables if they are never diff --git a/src/coreclr/src/vm/gchandletableutilities.h b/src/coreclr/src/vm/gchandleutilities.h similarity index 71% rename from src/coreclr/src/vm/gchandletableutilities.h rename to src/coreclr/src/vm/gchandleutilities.h index fb1a680..79bfc1b 100644 --- a/src/coreclr/src/vm/gchandletableutilities.h +++ b/src/coreclr/src/vm/gchandleutilities.h @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#ifndef _GCHANDLETABLEUTILITIES_H_ -#define _GCHANDLETABLEUTILITIES_H_ +#ifndef _GCHANDLEUTILITIES_H_ +#define _GCHANDLEUTILITIES_H_ #include "gcinterface.h" @@ -11,23 +11,23 @@ #include #endif -extern "C" IGCHandleTable* g_pGCHandleTable; +extern "C" IGCHandleManager* g_pGCHandleManager; -class GCHandleTableUtilities +class GCHandleUtilities { public: // Retrieves the GC handle table. - static IGCHandleTable* GetGCHandleTable() + static IGCHandleManager* GetGCHandleManager() { LIMITED_METHOD_CONTRACT; - assert(g_pGCHandleTable != nullptr); - return g_pGCHandleTable; + assert(g_pGCHandleManager != nullptr); + return g_pGCHandleManager; } private: // This class should never be instantiated. - GCHandleTableUtilities() = delete; + GCHandleUtilities() = delete; }; void ValidateHandleAndAppDomain(OBJECTHANDLE handle); @@ -119,39 +119,39 @@ inline OBJECTHANDLE CreateSizedRefHandle(IGCHandleStore* store, OBJECTREF object inline OBJECTHANDLE CreateGlobalHandle(OBJECTREF object) { CONDITIONAL_CONTRACT_VIOLATION(ModeViolation, object == NULL); - return GCHandleTableUtilities::GetGCHandleTable()->CreateGlobalHandleOfType(OBJECTREFToObject(object), HNDTYPE_DEFAULT); + return GCHandleUtilities::GetGCHandleManager()->CreateGlobalHandleOfType(OBJECTREFToObject(object), HNDTYPE_DEFAULT); } inline OBJECTHANDLE CreateGlobalWeakHandle(OBJECTREF object) { - return GCHandleTableUtilities::GetGCHandleTable()->CreateGlobalHandleOfType(OBJECTREFToObject(object), HNDTYPE_WEAK_DEFAULT); + return GCHandleUtilities::GetGCHandleManager()->CreateGlobalHandleOfType(OBJECTREFToObject(object), HNDTYPE_WEAK_DEFAULT); } inline OBJECTHANDLE CreateGlobalShortWeakHandle(OBJECTREF object) { CONDITIONAL_CONTRACT_VIOLATION(ModeViolation, object == NULL); - return GCHandleTableUtilities::GetGCHandleTable()->CreateGlobalHandleOfType(OBJECTREFToObject(object), HNDTYPE_WEAK_SHORT); + return GCHandleUtilities::GetGCHandleManager()->CreateGlobalHandleOfType(OBJECTREFToObject(object), HNDTYPE_WEAK_SHORT); } inline OBJECTHANDLE CreateGlobalLongWeakHandle(OBJECTREF object) { - return GCHandleTableUtilities::GetGCHandleTable()->CreateGlobalHandleOfType(OBJECTREFToObject(object), HNDTYPE_WEAK_LONG); + return GCHandleUtilities::GetGCHandleManager()->CreateGlobalHandleOfType(OBJECTREFToObject(object), HNDTYPE_WEAK_LONG); } inline OBJECTHANDLE CreateGlobalStrongHandle(OBJECTREF object) { CONDITIONAL_CONTRACT_VIOLATION(ModeViolation, object == NULL); - return GCHandleTableUtilities::GetGCHandleTable()->CreateGlobalHandleOfType(OBJECTREFToObject(object), HNDTYPE_STRONG); + return GCHandleUtilities::GetGCHandleManager()->CreateGlobalHandleOfType(OBJECTREFToObject(object), HNDTYPE_STRONG); } inline OBJECTHANDLE CreateGlobalPinningHandle(OBJECTREF object) { - return GCHandleTableUtilities::GetGCHandleTable()->CreateGlobalHandleOfType(OBJECTREFToObject(object), HNDTYPE_PINNED); + return GCHandleUtilities::GetGCHandleManager()->CreateGlobalHandleOfType(OBJECTREFToObject(object), HNDTYPE_PINNED); } inline OBJECTHANDLE CreateGlobalRefcountedHandle(OBJECTREF object) { - return GCHandleTableUtilities::GetGCHandleTable()->CreateGlobalHandleOfType(OBJECTREFToObject(object), HNDTYPE_REFCOUNTED); + return GCHandleUtilities::GetGCHandleManager()->CreateGlobalHandleOfType(OBJECTREFToObject(object), HNDTYPE_REFCOUNTED); } // Special handle creation convenience functions @@ -183,92 +183,92 @@ inline void DestroyHandle(OBJECTHANDLE handle) } CONTRACTL_END; - GCHandleTableUtilities::GetGCHandleTable()->DestroyHandleOfType(handle, HNDTYPE_DEFAULT); + GCHandleUtilities::GetGCHandleManager()->DestroyHandleOfType(handle, HNDTYPE_DEFAULT); } inline void DestroyWeakHandle(OBJECTHANDLE handle) { - GCHandleTableUtilities::GetGCHandleTable()->DestroyHandleOfType(handle, HNDTYPE_WEAK_DEFAULT); + GCHandleUtilities::GetGCHandleManager()->DestroyHandleOfType(handle, HNDTYPE_WEAK_DEFAULT); } inline void DestroyShortWeakHandle(OBJECTHANDLE handle) { - GCHandleTableUtilities::GetGCHandleTable()->DestroyHandleOfType(handle, HNDTYPE_WEAK_SHORT); + GCHandleUtilities::GetGCHandleManager()->DestroyHandleOfType(handle, HNDTYPE_WEAK_SHORT); } inline void DestroyLongWeakHandle(OBJECTHANDLE handle) { - GCHandleTableUtilities::GetGCHandleTable()->DestroyHandleOfType(handle, HNDTYPE_WEAK_LONG); + GCHandleUtilities::GetGCHandleManager()->DestroyHandleOfType(handle, HNDTYPE_WEAK_LONG); } inline void DestroyStrongHandle(OBJECTHANDLE handle) { - GCHandleTableUtilities::GetGCHandleTable()->DestroyHandleOfType(handle, HNDTYPE_STRONG); + GCHandleUtilities::GetGCHandleManager()->DestroyHandleOfType(handle, HNDTYPE_STRONG); } inline void DestroyPinningHandle(OBJECTHANDLE handle) { - GCHandleTableUtilities::GetGCHandleTable()->DestroyHandleOfType(handle, HNDTYPE_PINNED); + GCHandleUtilities::GetGCHandleManager()->DestroyHandleOfType(handle, HNDTYPE_PINNED); } inline void DestroyAsyncPinningHandle(OBJECTHANDLE handle) { - GCHandleTableUtilities::GetGCHandleTable()->DestroyHandleOfType(handle, HNDTYPE_ASYNCPINNED); + GCHandleUtilities::GetGCHandleManager()->DestroyHandleOfType(handle, HNDTYPE_ASYNCPINNED); } inline void DestroyRefcountedHandle(OBJECTHANDLE handle) { - GCHandleTableUtilities::GetGCHandleTable()->DestroyHandleOfType(handle, HNDTYPE_REFCOUNTED); + GCHandleUtilities::GetGCHandleManager()->DestroyHandleOfType(handle, HNDTYPE_REFCOUNTED); } inline void DestroyDependentHandle(OBJECTHANDLE handle) { - GCHandleTableUtilities::GetGCHandleTable()->DestroyHandleOfType(handle, HNDTYPE_DEPENDENT); + GCHandleUtilities::GetGCHandleManager()->DestroyHandleOfType(handle, HNDTYPE_DEPENDENT); } inline void DestroyVariableHandle(OBJECTHANDLE handle) { - GCHandleTableUtilities::GetGCHandleTable()->DestroyHandleOfType(handle, HNDTYPE_VARIABLE); + GCHandleUtilities::GetGCHandleManager()->DestroyHandleOfType(handle, HNDTYPE_VARIABLE); } inline void DestroyGlobalHandle(OBJECTHANDLE handle) { - GCHandleTableUtilities::GetGCHandleTable()->DestroyHandleOfType(handle, HNDTYPE_DEFAULT); + GCHandleUtilities::GetGCHandleManager()->DestroyHandleOfType(handle, HNDTYPE_DEFAULT); } inline void DestroyGlobalWeakHandle(OBJECTHANDLE handle) { - GCHandleTableUtilities::GetGCHandleTable()->DestroyHandleOfType(handle, HNDTYPE_WEAK_DEFAULT); + GCHandleUtilities::GetGCHandleManager()->DestroyHandleOfType(handle, HNDTYPE_WEAK_DEFAULT); } inline void DestroyGlobalShortWeakHandle(OBJECTHANDLE handle) { - GCHandleTableUtilities::GetGCHandleTable()->DestroyHandleOfType(handle, HNDTYPE_WEAK_SHORT); + GCHandleUtilities::GetGCHandleManager()->DestroyHandleOfType(handle, HNDTYPE_WEAK_SHORT); } inline void DestroyGlobalLongWeakHandle(OBJECTHANDLE handle) { - GCHandleTableUtilities::GetGCHandleTable()->DestroyHandleOfType(handle, HNDTYPE_WEAK_LONG); + GCHandleUtilities::GetGCHandleManager()->DestroyHandleOfType(handle, HNDTYPE_WEAK_LONG); } inline void DestroyGlobalStrongHandle(OBJECTHANDLE handle) { - GCHandleTableUtilities::GetGCHandleTable()->DestroyHandleOfType(handle, HNDTYPE_STRONG); + GCHandleUtilities::GetGCHandleManager()->DestroyHandleOfType(handle, HNDTYPE_STRONG); } inline void DestroyGlobalPinningHandle(OBJECTHANDLE handle) { - GCHandleTableUtilities::GetGCHandleTable()->DestroyHandleOfType(handle, HNDTYPE_PINNED); + GCHandleUtilities::GetGCHandleManager()->DestroyHandleOfType(handle, HNDTYPE_PINNED); } inline void DestroyGlobalRefcountedHandle(OBJECTHANDLE handle) { - GCHandleTableUtilities::GetGCHandleTable()->DestroyHandleOfType(handle, HNDTYPE_REFCOUNTED); + GCHandleUtilities::GetGCHandleManager()->DestroyHandleOfType(handle, HNDTYPE_REFCOUNTED); } inline void DestroyTypedHandle(OBJECTHANDLE handle) { - GCHandleTableUtilities::GetGCHandleTable()->DestroyHandleOfUnknownType(handle); + GCHandleUtilities::GetGCHandleManager()->DestroyHandleOfUnknownType(handle); } #ifdef FEATURE_COMINTEROP @@ -287,14 +287,14 @@ inline void DestroyWinRTWeakHandle(OBJECTHANDLE handle) // Release the WinRT weak reference if we have one. We're assuming that this will not reenter the // runtime, since if we are pointing at a managed object, we should not be using HNDTYPE_WEAK_WINRT // but rather HNDTYPE_WEAK_SHORT or HNDTYPE_WEAK_LONG. - void* pExtraInfo = GCHandleTableUtilities::GetGCHandleTable()->GetExtraInfoFromHandle(handle); + void* pExtraInfo = GCHandleUtilities::GetGCHandleManager()->GetExtraInfoFromHandle(handle); IWeakReference* pWinRTWeakReference = reinterpret_cast(pExtraInfo); if (pWinRTWeakReference != nullptr) { pWinRTWeakReference->Release(); } - GCHandleTableUtilities::GetGCHandleTable()->DestroyHandleOfType(handle, HNDTYPE_WEAK_WINRT); + GCHandleUtilities::GetGCHandleManager()->DestroyHandleOfType(handle, HNDTYPE_WEAK_WINRT); } #endif @@ -344,5 +344,5 @@ public: #endif // !DACCESS_COMPILE -#endif // _GCHANDLETABLEUTILITIES_H_ +#endif // _GCHANDLEUTILITIES_H_ diff --git a/src/coreclr/src/vm/gcheaputilities.cpp b/src/coreclr/src/vm/gcheaputilities.cpp index e1555833..4bce7f5 100644 --- a/src/coreclr/src/vm/gcheaputilities.cpp +++ b/src/coreclr/src/vm/gcheaputilities.cpp @@ -25,7 +25,7 @@ uint32_t* g_card_bundle_table = nullptr; // This is the global GC heap, maintained by the VM. GPTR_IMPL(IGCHeap, g_pGCHeap); -IGCHandleTable* g_pGCHandleTable = nullptr; +IGCHandleManager* g_pGCHandleManager = nullptr; GcDacVars g_gc_dac_vars; GPTR_IMPL(GcDacVars, g_gcDacGlobals); @@ -46,9 +46,9 @@ void ValidateHandleAndAppDomain(OBJECTHANDLE handle) OBJECTREF objRef = ObjectToOBJECTREF(*(Object**)handle); VALIDATEOBJECTREF(objRef); - IGCHandleTable *pHandleTable = GCHandleTableUtilities::GetGCHandleTable(); + IGCHandleManager *pHandleManager = GCHandleUtilities::GetGCHandleManager(); - DWORD context = (DWORD)pHandleTable->GetHandleContext(handle); + DWORD context = (DWORD)pHandleManager->GetHandleContext(handle); ADIndex appDomainIndex = ADIndex(context); AppDomain *domain = SystemDomain::GetAppDomainAtIndex(appDomainIndex); diff --git a/src/coreclr/src/vm/threads.cpp b/src/coreclr/src/vm/threads.cpp index a126d1c..c36232e 100644 --- a/src/coreclr/src/vm/threads.cpp +++ b/src/coreclr/src/vm/threads.cpp @@ -5074,7 +5074,7 @@ void Thread::SafeUpdateLastThrownObject(void) { EX_TRY { - IGCHandleTable *pHandleTable = GCHandleTableUtilities::GetGCHandleTable(); + IGCHandleManager *pHandleTable = GCHandleUtilities::GetGCHandleManager(); // Creating a duplicate handle here ensures that the AD of the last thrown object // matches the domain of the current throwable. diff --git a/src/coreclr/src/vm/threads.h b/src/coreclr/src/vm/threads.h index a055f2e..6b8825c 100644 --- a/src/coreclr/src/vm/threads.h +++ b/src/coreclr/src/vm/threads.h @@ -143,7 +143,7 @@ #include "mscoree.h" #include "appdomainstack.h" #include "gcheaputilities.h" -#include "gchandletableutilities.h" +#include "gchandleutilities.h" #include "gcinfotypes.h" #include -- 2.7.4