summaryrefslogtreecommitdiff
path: root/src/vm/gcheaputilities.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/gcheaputilities.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/gcheaputilities.cpp')
-rw-r--r--src/vm/gcheaputilities.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vm/gcheaputilities.cpp b/src/vm/gcheaputilities.cpp
index cd7afede70..d0bfda6c2d 100644
--- a/src/vm/gcheaputilities.cpp
+++ b/src/vm/gcheaputilities.cpp
@@ -78,7 +78,8 @@ void ValidateHandleAssignment(OBJECTHANDLE handle, OBJECTREF objRef)
_ASSERTE("Attempt to access destroyed handle." && *(_UNCHECKED_OBJECTREF*)handle != DEBUG_DestroyedHandleValue);
#endif
- ADIndex appDomainIndex = HndGetHandleADIndex(handle);
+ IGCHandleManager *mgr = GCHandleUtilities::GetGCHandleManager();
+ ADIndex appDomainIndex = ADIndex(reinterpret_cast<DWORD>(mgr->GetHandleContext(handle)));
AppDomain *unloadingDomain = SystemDomain::AppDomainBeingUnloaded();
if (unloadingDomain && unloadingDomain->GetIndex() == appDomainIndex && unloadingDomain->NoAccessToHandleTable())
@@ -88,4 +89,4 @@ void ValidateHandleAssignment(OBJECTHANDLE handle, OBJECTREF objRef)
ValidateObjectAndAppDomain(objRef, appDomainIndex);
#endif // _DEBUG_IMPL
-} \ No newline at end of file
+}