From: Aditya Mandaleeka Date: Mon, 17 Apr 2017 22:53:38 +0000 (-0700) Subject: Remove handle assignment validation from GC side. X-Git-Tag: submit/tizen/20210909.063632~11030^2~7181^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e37a950152c97d78293dcbd952ad0399f1ede3e;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Remove handle assignment validation from GC side. Commit migrated from https://github.com/dotnet/coreclr/commit/ae75f5d540b7373743d3698d6e2c1e7be93fd821 --- 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;