diff options
author | Sean Gillespie <segilles@microsoft.com> | 2017-06-23 14:48:41 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-23 14:48:41 -0700 |
commit | 3a24095610ecaba62495740bf8319ad467af4997 (patch) | |
tree | ca8321d9d9bdaf09a43078cb9422df3f34a666b0 /src/vm/marshalnative.cpp | |
parent | 16cee64552b4fd6d08dd84b273cc223094d5b5f6 (diff) | |
download | coreclr-3a24095610ecaba62495740bf8319ad467af4997.tar.gz coreclr-3a24095610ecaba62495740bf8319ad467af4997.tar.bz2 coreclr-3a24095610ecaba62495740bf8319ad467af4997.zip |
[Local GC] Remove a number of inclusions of handle table private headers from the VM (#12389)
* Remove inclusions of private handle table headers from the VM
* Add TraceRefCountedHandles to the GC handle table interface
* Fix the Unix build
* Move ValidatePinnedObject to marshalnative.h
Diffstat (limited to 'src/vm/marshalnative.cpp')
-rw-r--r-- | src/vm/marshalnative.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/vm/marshalnative.cpp b/src/vm/marshalnative.cpp index 8aebd9ab8e..34d7a861b5 100644 --- a/src/vm/marshalnative.cpp +++ b/src/vm/marshalnative.cpp @@ -30,7 +30,6 @@ #include "gcheaputilities.h" #include "security.h" #include "dbginterface.h" -#include "objecthandle.h" #include "marshalnative.h" #include "fcall.h" #include "dllimportcallback.h" @@ -592,7 +591,7 @@ FCIMPLEND // Check that the supplied object is valid to put in a pinned handle. // Throw an exception if not. -void GCHandleValidatePinnedObject(OBJECTREF obj) +void ValidatePinnedObject(OBJECTREF obj) { CONTRACTL { @@ -642,7 +641,7 @@ FCIMPL2(LPVOID, MarshalNative::GCHandleInternalAlloc, Object *obj, int type) // If it is a pinned handle, check the object type. if (type == HNDTYPE_PINNED) - GCHandleValidatePinnedObject(objRef); + ValidatePinnedObject(objRef); assert(type >= HNDTYPE_WEAK_SHORT && type <= HNDTYPE_WEAK_WINRT); // Create the handle. @@ -701,7 +700,7 @@ FCIMPL3(VOID, MarshalNative::GCHandleInternalSet, OBJECTHANDLE handle, Object *o //<TODO>@todo: If the handle is pinned check the object type.</TODO> if (isPinned) { - GCHandleValidatePinnedObject(objRef); + ValidatePinnedObject(objRef); } // Update the stored object reference. @@ -722,7 +721,7 @@ FCIMPL4(Object*, MarshalNative::GCHandleInternalCompareExchange, OBJECTHANDLE ha //<TODO>@todo: If the handle is pinned check the object type.</TODO> if (isPinned) - GCHandleValidatePinnedObject(newObjref); + ValidatePinnedObject(newObjref); // Update the stored object reference. ret = InterlockedCompareExchangeObjectInHandle(handle, newObjref, oldObjref); @@ -785,7 +784,7 @@ FCIMPL1(INT32, MarshalNative::CalculateCount, ArrayWithOffsetData* pArrayWithOff if (arrayObj->GetMethodTable()->IsMultiDimArray()) COMPlusThrow(kArgumentException, IDS_EE_NOTISOMORPHIC); - GCHandleValidatePinnedObject(arrayObj); + ValidatePinnedObject(arrayObj); } if (arrayObj == NULL) |