summaryrefslogtreecommitdiff
path: root/src/vm/runtimehandles.cpp
diff options
context:
space:
mode:
authorSean Gillespie <segilles@microsoft.com>2017-06-15 12:45:12 -0700
committerGitHub <noreply@github.com>2017-06-15 12:45:12 -0700
commitdda6b6136e21901842758970d831f31687913a35 (patch)
tree07ea3363dc390bb6cda64975ba3e911711e115bf /src/vm/runtimehandles.cpp
parentd734877cd86016296fc6c6e884a2b119339545ec (diff)
downloadcoreclr-dda6b6136e21901842758970d831f31687913a35.tar.gz
coreclr-dda6b6136e21901842758970d831f31687913a35.tar.bz2
coreclr-dda6b6136e21901842758970d831f31687913a35.zip
[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
Diffstat (limited to 'src/vm/runtimehandles.cpp')
-rw-r--r--src/vm/runtimehandles.cpp3
1 files changed, 2 insertions, 1 deletions
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>(handleType));
th.GetLoaderAllocator()->RegisterHandleForCleanup(objHandle);
END_QCALL;