From 0f66b465dbe7774ff7514d4f2e160f0616b4085a Mon Sep 17 00:00:00 2001 From: Sean Gillespie Date: Wed, 17 May 2017 15:41:34 -0700 Subject: [Local GC] Fix some handle table interface violations in COMDependentHandle (#11358) --- src/gc/gchandletable.cpp | 10 ++++++++++ src/gc/gchandletableimpl.h | 4 ++++ src/gc/gcinterface.h | 4 ++++ 3 files changed, 18 insertions(+) (limited to 'src/gc') diff --git a/src/gc/gchandletable.cpp b/src/gc/gchandletable.cpp index 52fede6299..ea02308e0b 100644 --- a/src/gc/gchandletable.cpp +++ b/src/gc/gchandletable.cpp @@ -147,6 +147,16 @@ bool GCHandleManager::StoreObjectInHandleIfNull(OBJECTHANDLE handle, Object* obj return !!::HndFirstAssignHandle(handle, ObjectToOBJECTREF(object)); } +void GCHandleManager::SetDependentHandleSecondary(OBJECTHANDLE handle, Object* object) +{ + ::SetDependentHandleSecondary(handle, ObjectToOBJECTREF(object)); +} + +Object* GCHandleManager::GetDependentHandleSecondary(OBJECTHANDLE handle) +{ + return OBJECTREFToObject(::GetDependentHandleSecondary(handle)); +} + Object* GCHandleManager::InterlockedCompareExchangeObjectInHandle(OBJECTHANDLE handle, Object* object, Object* comparandObject) { return (Object*)::HndInterlockedCompareExchangeHandle(handle, ObjectToOBJECTREF(object), ObjectToOBJECTREF(comparandObject)); diff --git a/src/gc/gchandletableimpl.h b/src/gc/gchandletableimpl.h index 01c1c130ed..a0a03ae3cb 100644 --- a/src/gc/gchandletableimpl.h +++ b/src/gc/gchandletableimpl.h @@ -59,6 +59,10 @@ public: virtual bool StoreObjectInHandleIfNull(OBJECTHANDLE handle, Object* object); + virtual void SetDependentHandleSecondary(OBJECTHANDLE handle, Object* object); + + virtual Object* GetDependentHandleSecondary(OBJECTHANDLE handle); + virtual Object* InterlockedCompareExchangeObjectInHandle(OBJECTHANDLE handle, Object* object, Object* comparandObject); }; diff --git a/src/gc/gcinterface.h b/src/gc/gcinterface.h index 425745b0cb..3cea6a184c 100644 --- a/src/gc/gcinterface.h +++ b/src/gc/gcinterface.h @@ -458,6 +458,10 @@ public: virtual bool StoreObjectInHandleIfNull(OBJECTHANDLE handle, Object* object) = 0; + virtual void SetDependentHandleSecondary(OBJECTHANDLE handle, Object* object) = 0; + + virtual Object* GetDependentHandleSecondary(OBJECTHANDLE handle) = 0; + virtual Object* InterlockedCompareExchangeObjectInHandle(OBJECTHANDLE handle, Object* object, Object* comparandObject) = 0; }; -- cgit v1.2.3