From 0e37a950152c97d78293dcbd952ad0399f1ede3e Mon Sep 17 00:00:00 2001 From: Aditya Mandaleeka Date: Mon, 17 Apr 2017 15:53:38 -0700 Subject: [PATCH] Remove handle assignment validation from GC side. Commit migrated from https://github.com/dotnet/coreclr/commit/ae75f5d540b7373743d3698d6e2c1e7be93fd821 --- src/coreclr/src/gc/handletable.inl | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/coreclr/src/gc/handletable.inl b/src/coreclr/src/gc/handletable.inl index ae815c1..752a7b0 100644 --- a/src/coreclr/src/gc/handletable.inl +++ b/src/coreclr/src/gc/handletable.inl @@ -22,13 +22,6 @@ inline void HndAssignHandle(OBJECTHANDLE handle, OBJECTREF objref) // sanity _ASSERTE(handle); -#ifdef _DEBUG_IMPL - // handle should not be in unloaded domain - ValidateAppDomainForHandle(handle); - - // Make sure the objref is valid before it is assigned to a handle - ValidateAssignObjrefForHandle(objref, HndGetHandleTableADIndex(HndGetHandleTable(handle))); -#endif // unwrap the objectref we were given _UNCHECKED_OBJECTREF value = OBJECTREF_TO_UNCHECKED_OBJECTREF(objref); @@ -49,13 +42,6 @@ inline void* HndInterlockedCompareExchangeHandle(OBJECTHANDLE handle, OBJECTREF // sanity _ASSERTE(handle); -#ifdef _DEBUG_IMPL - // handle should not be in unloaded domain - ValidateAppDomainForHandle(handle); - - // Make sure the objref is valid before it is assigned to a handle - ValidateAssignObjrefForHandle(objref, HndGetHandleTableADIndex(HndGetHandleTable(handle))); -#endif // unwrap the objectref we were given _UNCHECKED_OBJECTREF value = OBJECTREF_TO_UNCHECKED_OBJECTREF(objref); _UNCHECKED_OBJECTREF oldValue = OBJECTREF_TO_UNCHECKED_OBJECTREF(oldObjref); @@ -88,13 +74,6 @@ inline BOOL HndFirstAssignHandle(OBJECTHANDLE handle, OBJECTREF objref) // sanity _ASSERTE(handle); -#ifdef _DEBUG_IMPL - // handle should not be in unloaded domain - ValidateAppDomainForHandle(handle); - - // Make sure the objref is valid before it is assigned to a handle - ValidateAssignObjrefForHandle(objref, HndGetHandleTableADIndex(HndGetHandleTable(handle))); -#endif // unwrap the objectref we were given _UNCHECKED_OBJECTREF value = OBJECTREF_TO_UNCHECKED_OBJECTREF(objref); _UNCHECKED_OBJECTREF null = NULL; -- 2.7.4