From fc0ed57a5f25d8a7b3fbf200224bd880ed05eff5 Mon Sep 17 00:00:00 2001 From: "Pechetty Sravani (xWF)" Date: Tue, 3 Sep 2024 05:20:26 +0000 Subject: Revert^3 "Object.clone() allocates more movable objects" This reverts commit 1956542906d0b128a86975af009ba4601d02129a. Reason for revert: Droid Monitor created revert due to this b/363849521. Change-Id: Ic56e46bc11b1fd696b82f29782a1d1735ee805a9 --- runtime/mirror/array-alloc-inl.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'runtime/mirror/array-alloc-inl.h') diff --git a/runtime/mirror/array-alloc-inl.h b/runtime/mirror/array-alloc-inl.h index 69d2e2017f..b905fd1727 100644 --- a/runtime/mirror/array-alloc-inl.h +++ b/runtime/mirror/array-alloc-inl.h @@ -143,14 +143,16 @@ inline ObjPtr Array::Alloc(Thread* self, ObjPtr result; if (!kFillUsable) { SetLengthVisitor visitor(component_count); - result = ObjPtr::DownCast(heap->AllocObjectWithAllocator( - self, array_class, size, allocator_type, visitor)); + result = ObjPtr::DownCast( + heap->AllocObjectWithAllocator( + self, array_class, size, allocator_type, visitor)); } else { SetLengthToUsableSizeVisitor visitor(component_count, DataOffset(1U << component_size_shift).SizeValue(), component_size_shift); - result = ObjPtr::DownCast(heap->AllocObjectWithAllocator( - self, array_class, size, allocator_type, visitor)); + result = ObjPtr::DownCast( + heap->AllocObjectWithAllocator( + self, array_class, size, allocator_type, visitor)); } if (kIsDebugBuild && result != nullptr && Runtime::Current()->IsStarted()) { array_class = result->GetClass(); // In case the array class moved. -- cgit v1.2.3-59-g8ed1b