summaryrefslogtreecommitdiff
path: root/runtime/gc/heap_test.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2019-03-22 13:38:57 +0000
committer Vladimir Marko <vmarko@google.com> 2019-03-25 16:54:37 +0000
commit179b7c61ea6769b99f70c80a7a89cbb212423ec2 (patch)
tree06130898bfb2d8c3f71f4fe181277f20e1942726 /runtime/gc/heap_test.cc
parentc8b7d445e02b752a68d824e2bc69658dfb76288a (diff)
ObjPtr<>-ify String allocations, fix stale refs.
ObjPtr<>-ify String allocation functions and related code and remove some unnecessary calls to ObjPtr<>::Ptr(). Fix stale reference uses in reference_table_test and stub_test. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 31113334 Change-Id: I42927fb8b7240e5132188f73318b2ccb218748fd
Diffstat (limited to 'runtime/gc/heap_test.cc')
-rw-r--r--runtime/gc/heap_test.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/gc/heap_test.cc b/runtime/gc/heap_test.cc
index fa10150d46..5f4621e6f1 100644
--- a/runtime/gc/heap_test.cc
+++ b/runtime/gc/heap_test.cc
@@ -74,7 +74,8 @@ TEST_F(HeapTest, GarbageCollectClassLinkerInit) {
Handle<mirror::ObjectArray<mirror::Object>> array(hs2.NewHandle(
mirror::ObjectArray<mirror::Object>::Alloc(soa.Self(), c.Get(), 2048)));
for (size_t j = 0; j < 2048; ++j) {
- mirror::String* string = mirror::String::AllocFromModifiedUtf8(soa.Self(), "hello, world!");
+ ObjPtr<mirror::String> string =
+ mirror::String::AllocFromModifiedUtf8(soa.Self(), "hello, world!");
// handle scope operator -> deferences the handle scope before running the method.
array->Set<false>(j, string);
}