summaryrefslogtreecommitdiff
path: root/runtime/gc/heap_verification_test.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2018-05-24 11:09:38 +0100
committer Vladimir Marko <vmarko@google.com> 2018-05-25 11:32:31 +0100
commitb4eb1b19e1dd35d12a408358656c1421f507d231 (patch)
tree03ba65d206b5e6222dcca0f62a973bcbb1bf8a50 /runtime/gc/heap_verification_test.cc
parentff7ff426e136aa8fd6e33d873f6259311982f6bb (diff)
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
Diffstat (limited to 'runtime/gc/heap_verification_test.cc')
-rw-r--r--runtime/gc/heap_verification_test.cc4
1 files changed, 2 insertions, 2 deletions
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 <class T>
mirror::ObjectArray<T>* AllocObjectArray(Thread* self, size_t length)
REQUIRES_SHARED(Locks::mutator_lock_) {
- ClassLinker* const class_linker = Runtime::Current()->GetClassLinker();
return mirror::ObjectArray<T>::Alloc(
self,
- class_linker->GetClassRoot(ClassLinker::ClassRoot::kObjectArrayClass),
+ GetClassRoot<mirror::ObjectArray<mirror::Object>>(),
length);
}
};