summaryrefslogtreecommitdiff
path: root/runtime/entrypoints/entrypoint_utils-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/entrypoints/entrypoint_utils-inl.h')
-rw-r--r--runtime/entrypoints/entrypoint_utils-inl.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/runtime/entrypoints/entrypoint_utils-inl.h b/runtime/entrypoints/entrypoint_utils-inl.h
index 1e422014dd..338928ec16 100644
--- a/runtime/entrypoints/entrypoint_utils-inl.h
+++ b/runtime/entrypoints/entrypoint_utils-inl.h
@@ -199,15 +199,14 @@ inline ObjPtr<mirror::Object> AllocObjectFromCodeResolved(ObjPtr<mirror::Class>
return nullptr;
}
gc::Heap* heap = Runtime::Current()->GetHeap();
- // Pass in kNoAddFinalizer since the object cannot be finalizable.
+ // Pass in false since the object cannot be finalizable.
// CheckClassInitializedForObjectAlloc can cause thread suspension which means we may now be
// instrumented.
- return klass->Alloc</*kInstrumented=*/true, mirror::Class::AddFinalizer::kNoAddFinalizer>(
+ return klass->Alloc</*kInstrumented=*/true, /*kCheckAddFinalizer=*/false>(
self, heap->GetCurrentAllocator());
}
- // Pass in kNoAddFinalizer since the object cannot be finalizable.
- return klass->Alloc<kInstrumented,
- mirror::Class::AddFinalizer::kNoAddFinalizer>(self, allocator_type);
+ // Pass in false since the object cannot be finalizable.
+ return klass->Alloc<kInstrumented, /*kCheckAddFinalizer=*/false>(self, allocator_type);
}
// Given the context of a calling Method and an initialized class, create an instance.
@@ -217,9 +216,8 @@ inline ObjPtr<mirror::Object> AllocObjectFromCodeInitialized(ObjPtr<mirror::Clas
Thread* self,
gc::AllocatorType allocator_type) {
DCHECK(klass != nullptr);
- // Pass in kNoAddFinalizer since the object cannot be finalizable.
- return klass->Alloc<kInstrumented,
- mirror::Class::AddFinalizer::kNoAddFinalizer>(self, allocator_type);
+ // Pass in false since the object cannot be finalizable.
+ return klass->Alloc<kInstrumented, /*kCheckAddFinalizer=*/false>(self, allocator_type);
}