From b4eb1b19e1dd35d12a408358656c1421f507d231 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Thu, 24 May 2018 11:09:38 +0100 Subject: Refactor ClassRoot/GetClassRoot(). Move it outside the ClassLinker, into its own header file, and add retrieval based on a mirror class template argument. Keep the SetClassRoot() as a private member of ClassLinker. Make the new GetClassRoot()s return ObjPtr<>. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 31113334 Change-Id: Icbc6b62b41f6ffd65b437297a21eadbb0454e2b7 --- runtime/gc/heap_verification_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/gc/heap_verification_test.cc') diff --git a/runtime/gc/heap_verification_test.cc b/runtime/gc/heap_verification_test.cc index 40ee86ce79..4f06ee6910 100644 --- a/runtime/gc/heap_verification_test.cc +++ b/runtime/gc/heap_verification_test.cc @@ -18,6 +18,7 @@ #include "base/memory_tool.h" #include "class_linker-inl.h" +#include "class_root.h" #include "handle_scope-inl.h" #include "mirror/object-inl.h" #include "mirror/object_array-inl.h" @@ -36,10 +37,9 @@ class VerificationTest : public CommonRuntimeTest { template mirror::ObjectArray* AllocObjectArray(Thread* self, size_t length) REQUIRES_SHARED(Locks::mutator_lock_) { - ClassLinker* const class_linker = Runtime::Current()->GetClassLinker(); return mirror::ObjectArray::Alloc( self, - class_linker->GetClassRoot(ClassLinker::ClassRoot::kObjectArrayClass), + GetClassRoot>(), length); } }; -- cgit v1.2.3-59-g8ed1b