summaryrefslogtreecommitdiffstats
path: root/runtime/mirror/object_reference.h
diff options
context:
space:
mode:
authorHiroshi Yamauchi <yamauchi@google.com>2014-02-27 14:44:36 -0800
committerHiroshi Yamauchi <yamauchi@google.com>2014-03-05 19:20:14 -0800
commite63a745f26fec5a5b4162fc83f6e88a1f696c30c (patch)
treef26e1429c8226c5dde5ee4c361a57754ff46298c /runtime/mirror/object_reference.h
parente26baffe7f9e2a54f276f5c65e48454e413683ba (diff)
downloadart-e63a745f26fec5a5b4162fc83f6e88a1f696c30c.tar.gz
art-e63a745f26fec5a5b4162fc83f6e88a1f696c30c.tar.bz2
art-e63a745f26fec5a5b4162fc83f6e88a1f696c30c.zip
Make heap reference poisoning work with the interpreter.
It is disabled by default. Bug: 12687968 Change-Id: Iee0cad647f341a7b566f4cf74c2770d1c19312c9
Diffstat (limited to 'runtime/mirror/object_reference.h')
-rw-r--r--runtime/mirror/object_reference.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/mirror/object_reference.h b/runtime/mirror/object_reference.h
index b30890f99a..94869e55b6 100644
--- a/runtime/mirror/object_reference.h
+++ b/runtime/mirror/object_reference.h
@@ -17,6 +17,7 @@
#ifndef ART_RUNTIME_MIRROR_OBJECT_REFERENCE_H_
#define ART_RUNTIME_MIRROR_OBJECT_REFERENCE_H_
+#include "globals.h"
#include "locks.h"
namespace art {
@@ -74,7 +75,7 @@ class MANAGED ObjectReference {
// References between objects within the managed heap.
template<class MirrorType>
-class MANAGED HeapReference : public ObjectReference<false, MirrorType> {
+class MANAGED HeapReference : public ObjectReference<kPoisonHeapReferences, MirrorType> {
public:
static HeapReference<MirrorType> FromMirrorPtr(MirrorType* mirror_ptr)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
@@ -82,7 +83,7 @@ class MANAGED HeapReference : public ObjectReference<false, MirrorType> {
}
private:
HeapReference<MirrorType>(MirrorType* mirror_ptr) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_)
- : ObjectReference<false, MirrorType>(mirror_ptr) {}
+ : ObjectReference<kPoisonHeapReferences, MirrorType>(mirror_ptr) {}
};
} // namespace mirror