diff options
Diffstat (limited to 'runtime/entrypoints/entrypoint_utils.cc')
-rw-r--r-- | runtime/entrypoints/entrypoint_utils.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/entrypoints/entrypoint_utils.cc b/runtime/entrypoints/entrypoint_utils.cc index 4078cac077..829ec4ac86 100644 --- a/runtime/entrypoints/entrypoint_utils.cc +++ b/runtime/entrypoints/entrypoint_utils.cc @@ -87,7 +87,8 @@ mirror::Array* CheckAndAllocArrayFromCode(uint32_t type_idx, mirror::ArtMethod* gc::Heap* heap = Runtime::Current()->GetHeap(); // Use the current allocator type in case CheckFilledNewArrayAlloc caused us to suspend and then // the heap switched the allocator type while we were suspended. - return mirror::Array::Alloc<false>(self, klass, component_count, heap->GetCurrentAllocator()); + return mirror::Array::Alloc<false>(self, klass, component_count, klass->GetComponentSize(), + heap->GetCurrentAllocator()); } // Helper function to allocate array for FILLED_NEW_ARRAY. @@ -103,7 +104,8 @@ mirror::Array* CheckAndAllocArrayFromCodeInstrumented(uint32_t type_idx, mirror: gc::Heap* heap = Runtime::Current()->GetHeap(); // Use the current allocator type in case CheckFilledNewArrayAlloc caused us to suspend and then // the heap switched the allocator type while we were suspended. - return mirror::Array::Alloc<true>(self, klass, component_count, heap->GetCurrentAllocator()); + return mirror::Array::Alloc<true>(self, klass, component_count, klass->GetComponentSize(), + heap->GetCurrentAllocator()); } void ThrowStackOverflowError(Thread* self) { |