summaryrefslogtreecommitdiff
path: root/src/gc
diff options
context:
space:
mode:
authorSean Gillespie <segilles@microsoft.com>2017-05-17 15:41:34 -0700
committerSean Gillespie <segilles@microsoft.com>2017-06-01 10:19:59 -0700
commit0f66b465dbe7774ff7514d4f2e160f0616b4085a (patch)
tree401a23b43306f18fdd772f6561a12b135ee3e4e9 /src/gc
parent5529df988f80e7fe67ec46f9f6cbd169fdf7edd5 (diff)
downloadcoreclr-0f66b465dbe7774ff7514d4f2e160f0616b4085a.tar.gz
coreclr-0f66b465dbe7774ff7514d4f2e160f0616b4085a.tar.bz2
coreclr-0f66b465dbe7774ff7514d4f2e160f0616b4085a.zip
[Local GC] Fix some handle table interface violations in COMDependentHandle (#11358)
Diffstat (limited to 'src/gc')
-rw-r--r--src/gc/gchandletable.cpp10
-rw-r--r--src/gc/gchandletableimpl.h4
-rw-r--r--src/gc/gcinterface.h4
3 files changed, 18 insertions, 0 deletions
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;
};