summaryrefslogtreecommitdiff
path: root/src/vm/appdomain.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/appdomain.hpp')
-rw-r--r--src/vm/appdomain.hpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/vm/appdomain.hpp b/src/vm/appdomain.hpp
index 898e50f1c2..a5bd00d36b 100644
--- a/src/vm/appdomain.hpp
+++ b/src/vm/appdomain.hpp
@@ -28,7 +28,7 @@
#include "ilstubcache.h"
#include "testhookmgr.h"
#include "gcheaputilities.h"
-#include "gchandletableutilities.h"
+#include "gchandleutilities.h"
#include "../binder/inc/applicationcontext.hpp"
#include "rejit.h"
@@ -1245,8 +1245,13 @@ public:
{
WRAPPER_NO_CONTRACT;
- IGCHandleTable *pHandleTable = GCHandleTableUtilities::GetGCHandleTable();
- return pHandleTable->CreateHandleOfType(m_handleStore, OBJECTREFToObject(object), type);
+ OBJECTHANDLE hnd = m_handleStore->CreateHandleOfType(OBJECTREFToObject(object), type);
+ if (!hnd)
+ {
+ COMPlusThrowOM();
+ }
+
+ return hnd;
}
OBJECTHANDLE CreateHandle(OBJECTREF object)
@@ -1319,7 +1324,7 @@ public:
{
CONTRACTL
{
- THROWS;
+ NOTHROW;
GC_NOTRIGGER;
MODE_COOPERATIVE;
}
@@ -1339,14 +1344,19 @@ public:
{
CONTRACTL
{
- THROWS;
+ NOTHROW;
GC_NOTRIGGER;
MODE_COOPERATIVE;
}
CONTRACTL_END;
- IGCHandleTable *pHandleTable = GCHandleTableUtilities::GetGCHandleTable();
- return pHandleTable->CreateDependentHandle(m_handleStore, OBJECTREFToObject(primary), OBJECTREFToObject(secondary));
+ OBJECTHANDLE hnd = m_handleStore->CreateDependentHandle(OBJECTREFToObject(primary), OBJECTREFToObject(secondary));
+ if (!hnd)
+ {
+ COMPlusThrowOM();
+ }
+
+ return hnd;
}
#endif // DACCESS_COMPILE && !CROSSGEN_COMPILE
@@ -1402,7 +1412,7 @@ protected:
CLRPrivBinderCoreCLR *m_pTPABinderContext; // Reference to the binding context that holds TPA list details
- void* m_handleStore;
+ IGCHandleStore* m_handleStore;
// The large heap handle table.
LargeHeapHandleTable *m_pLargeHeapHandleTable;