From dda6b6136e21901842758970d831f31687913a35 Mon Sep 17 00:00:00 2001 From: Sean Gillespie Date: Thu, 15 Jun 2017 12:45:12 -0700 Subject: [Local GC] Fix a number of handle table interface violations (#12277) * Fix a smattering of GC handle table interface violations Stub out a few other handle violations * [Local GC] Add SetExtraInfoForHandle onto GC handle manager interface * [Local GC] Changes uses of HndGetHandleADIndex to GetHandleContext * Add HandleGetType to GC handle table interface 1) Change IGCHandleManager methods that take "int" to represent the type of a handle to HandleType, and fix callers to cast to HandleType 2) Add HandleFetchType to IGCHandleManager, returning a HandleType 3) Fix uses of handtablepriv's HandleFetchType and remove the GC directory from the include path * 9 -> HNDTYPE_WEAK_WINRT, 0 -> HNDTYPE_WEAK_SHORT in assert --- src/vm/runtimehandles.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/vm/runtimehandles.cpp') diff --git a/src/vm/runtimehandles.cpp b/src/vm/runtimehandles.cpp index fa0feb8bc4..da47cc9e70 100644 --- a/src/vm/runtimehandles.cpp +++ b/src/vm/runtimehandles.cpp @@ -1152,7 +1152,8 @@ PVOID QCALLTYPE RuntimeTypeHandle::GetGCHandle(EnregisteredTypeHandle pTypeHandl GCX_COOP(); TypeHandle th = TypeHandle::FromPtr(pTypeHandle); - objHandle = th.GetDomain()->CreateTypedHandle(NULL, handleType); + assert(handleType >= HNDTYPE_WEAK_SHORT && handleType <= HNDTYPE_WEAK_WINRT); + objHandle = th.GetDomain()->CreateTypedHandle(NULL, static_cast(handleType)); th.GetLoaderAllocator()->RegisterHandleForCleanup(objHandle); END_QCALL; -- cgit v1.2.3