Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit ae75f5d

Browse files
Remove handle assignment validation from GC side.
1 parent 0bd13a2 commit ae75f5d

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

src/gc/handletable.inl

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ inline void HndAssignHandle(OBJECTHANDLE handle, OBJECTREF objref)
2222
// sanity
2323
_ASSERTE(handle);
2424

25-
#ifdef _DEBUG_IMPL
26-
// handle should not be in unloaded domain
27-
ValidateAppDomainForHandle(handle);
28-
29-
// Make sure the objref is valid before it is assigned to a handle
30-
ValidateAssignObjrefForHandle(objref, HndGetHandleTableADIndex(HndGetHandleTable(handle)));
31-
#endif
3225
// unwrap the objectref we were given
3326
_UNCHECKED_OBJECTREF value = OBJECTREF_TO_UNCHECKED_OBJECTREF(objref);
3427

@@ -49,13 +42,6 @@ inline void* HndInterlockedCompareExchangeHandle(OBJECTHANDLE handle, OBJECTREF
4942
// sanity
5043
_ASSERTE(handle);
5144

52-
#ifdef _DEBUG_IMPL
53-
// handle should not be in unloaded domain
54-
ValidateAppDomainForHandle(handle);
55-
56-
// Make sure the objref is valid before it is assigned to a handle
57-
ValidateAssignObjrefForHandle(objref, HndGetHandleTableADIndex(HndGetHandleTable(handle)));
58-
#endif
5945
// unwrap the objectref we were given
6046
_UNCHECKED_OBJECTREF value = OBJECTREF_TO_UNCHECKED_OBJECTREF(objref);
6147
_UNCHECKED_OBJECTREF oldValue = OBJECTREF_TO_UNCHECKED_OBJECTREF(oldObjref);
@@ -88,13 +74,6 @@ inline BOOL HndFirstAssignHandle(OBJECTHANDLE handle, OBJECTREF objref)
8874
// sanity
8975
_ASSERTE(handle);
9076

91-
#ifdef _DEBUG_IMPL
92-
// handle should not be in unloaded domain
93-
ValidateAppDomainForHandle(handle);
94-
95-
// Make sure the objref is valid before it is assigned to a handle
96-
ValidateAssignObjrefForHandle(objref, HndGetHandleTableADIndex(HndGetHandleTable(handle)));
97-
#endif
9877
// unwrap the objectref we were given
9978
_UNCHECKED_OBJECTREF value = OBJECTREF_TO_UNCHECKED_OBJECTREF(objref);
10079
_UNCHECKED_OBJECTREF null = NULL;

0 commit comments

Comments
 (0)