diff options
Diffstat (limited to 'runtime/gc_root.h')
-rw-r--r-- | runtime/gc_root.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/gc_root.h b/runtime/gc_root.h index bdc7d5c8e6..b67e9c29b4 100644 --- a/runtime/gc_root.h +++ b/runtime/gc_root.h @@ -162,6 +162,9 @@ class GcRoot { ALWAYS_INLINE GcRoot(MirrorType* ref = nullptr) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); private: + // Root visitors take pointers to root_ and place the min CompressedReference** arrays. We use a + // CompressedReference<mirror::Object> here since it violates strict aliasing requirements to + // cast CompressedReference<MirrorType>* to CompressedReference<mirror::Object>*. mutable mirror::CompressedReference<mirror::Object> root_; template <size_t kBufferSize> friend class BufferedRootVisitor; |