summaryrefslogtreecommitdiff
path: root/runtime/mirror/array-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/mirror/array-inl.h')
-rw-r--r--runtime/mirror/array-inl.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/mirror/array-inl.h b/runtime/mirror/array-inl.h
index 9d7f98fe62..7cbcac8030 100644
--- a/runtime/mirror/array-inl.h
+++ b/runtime/mirror/array-inl.h
@@ -100,10 +100,10 @@ class SetLengthVisitor {
explicit SetLengthVisitor(int32_t length) : length_(length) {
}
- void operator()(Object* obj, size_t usable_size ATTRIBUTE_UNUSED) const
+ void operator()(ObjPtr<Object> obj, size_t usable_size ATTRIBUTE_UNUSED) const
REQUIRES_SHARED(Locks::mutator_lock_) {
// Avoid AsArray as object is not yet in live bitmap or allocation stack.
- Array* array = down_cast<Array*>(obj);
+ ObjPtr<Array> array = ObjPtr<Array>::DownCast(obj);
// DCHECK(array->IsArrayInstance());
array->SetLength(length_);
}
@@ -124,10 +124,10 @@ class SetLengthToUsableSizeVisitor {
component_size_shift_(component_size_shift) {
}
- void operator()(Object* obj, size_t usable_size) const
+ void operator()(ObjPtr<Object> obj, size_t usable_size) const
REQUIRES_SHARED(Locks::mutator_lock_) {
// Avoid AsArray as object is not yet in live bitmap or allocation stack.
- Array* array = down_cast<Array*>(obj);
+ ObjPtr<Array> array = ObjPtr<Array>::DownCast(obj);
// DCHECK(array->IsArrayInstance());
int32_t length = (usable_size - header_size_) >> component_size_shift_;
DCHECK_GE(length, minimum_length_);