From 28bd2e4f151267b34b8e1eb19c489d8d547bbf5c Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Tue, 4 Oct 2016 13:54:57 -0700 Subject: Move mirror::Class to use ObjPtr Leave the return types as non ObjPtr for now. Fixed moving GC bugs in tests. Test: test-art-host Bug: 31113334 Change-Id: I5da1b5ac55dfbc5cc97a64be2c870ba9f512d9b0 --- runtime/entrypoints/entrypoint_utils-inl.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'runtime/entrypoints/entrypoint_utils-inl.h') diff --git a/runtime/entrypoints/entrypoint_utils-inl.h b/runtime/entrypoints/entrypoint_utils-inl.h index e37db7dd92..8077c21bdc 100644 --- a/runtime/entrypoints/entrypoint_utils-inl.h +++ b/runtime/entrypoints/entrypoint_utils-inl.h @@ -231,10 +231,10 @@ inline mirror::Object* AllocObjectFromCode(uint32_t type_idx, // CheckObjectAlloc can cause thread suspension which means we may now be instrumented. return klass->Alloc( self, - Runtime::Current()->GetHeap()->GetCurrentAllocator()); + Runtime::Current()->GetHeap()->GetCurrentAllocator()).Ptr(); } DCHECK(klass != nullptr); - return klass->Alloc(self, allocator_type); + return klass->Alloc(self, allocator_type).Ptr(); } // Given the context of a calling Method and a resolved class, create an instance. @@ -254,10 +254,10 @@ inline mirror::Object* AllocObjectFromCodeResolved(mirror::Class* klass, // Pass in false since the object cannot be finalizable. // CheckClassInitializedForObjectAlloc can cause thread suspension which means we may now be // instrumented. - return klass->Alloc(self, heap->GetCurrentAllocator()); + return klass->Alloc(self, heap->GetCurrentAllocator()).Ptr(); } // Pass in false since the object cannot be finalizable. - return klass->Alloc(self, allocator_type); + return klass->Alloc(self, allocator_type).Ptr(); } // Given the context of a calling Method and an initialized class, create an instance. @@ -268,7 +268,7 @@ inline mirror::Object* AllocObjectFromCodeInitialized(mirror::Class* klass, gc::AllocatorType allocator_type) { DCHECK(klass != nullptr); // Pass in false since the object cannot be finalizable. - return klass->Alloc(self, allocator_type); + return klass->Alloc(self, allocator_type).Ptr(); } -- cgit v1.2.3-59-g8ed1b