diff options
Diffstat (limited to 'runtime/mirror/array.cc')
-rw-r--r-- | runtime/mirror/array.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/runtime/mirror/array.cc b/runtime/mirror/array.cc index a4f6c88e4c..65371d0f5e 100644 --- a/runtime/mirror/array.cc +++ b/runtime/mirror/array.cc @@ -144,9 +144,8 @@ ObjPtr<Array> Array::CopyOf(Handle<Array> h_this, Thread* self, int32_t new_leng CHECK(klass->IsPrimitiveArray()) << "Will miss write barriers"; DCHECK_GE(new_length, 0); auto* heap = Runtime::Current()->GetHeap(); - gc::AllocatorType allocator_type = heap->IsMovableObject(h_this.Get()) - ? heap->GetCurrentAllocator() - : heap->GetCurrentNonMovingAllocator(); + DCHECK(!heap->IsNonMovable(h_this.Get())); + gc::AllocatorType allocator_type = heap->GetCurrentAllocator(); const auto component_size = klass->GetComponentSize(); const auto component_shift = klass->GetComponentSizeShift(); ObjPtr<Array> new_array = |