summaryrefslogtreecommitdiffstats
path: root/runtime/native/java_lang_reflect_Array.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/native/java_lang_reflect_Array.cc')
-rw-r--r--runtime/native/java_lang_reflect_Array.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/native/java_lang_reflect_Array.cc b/runtime/native/java_lang_reflect_Array.cc
index 058458fa39..763a6645b9 100644
--- a/runtime/native/java_lang_reflect_Array.cc
+++ b/runtime/native/java_lang_reflect_Array.cc
@@ -59,9 +59,10 @@ static jobject Array_createObjectArray(JNIEnv* env, jclass, jclass javaElementCl
return NULL;
}
DCHECK(array_class->IsObjectArrayClass());
- mirror::Array* new_array = mirror::Array::Alloc<true>(soa.Self(), array_class, length,
- sizeof(mirror::HeapReference<mirror::Object>),
- runtime->GetHeap()->GetCurrentAllocator());
+ mirror::Array* new_array = mirror::Array::Alloc<true>(
+ soa.Self(), array_class, length,
+ ComponentSizeShiftWidth<sizeof(mirror::HeapReference<mirror::Object>)>(),
+ runtime->GetHeap()->GetCurrentAllocator());
return soa.AddLocalReference<jobject>(new_array);
}