diff options
author | 2016-10-06 17:44:26 -0700 | |
---|---|---|
committer | 2016-10-12 09:49:49 -0700 | |
commit | 9d156d500801accee919b6d51e22d6ddcdcd4a05 (patch) | |
tree | 92129562c0ba1673c660297f26444a4a2ad31459 /runtime/mirror/array-inl.h | |
parent | 078483d4dfd049d5b3f192a99e2dfdc355e4754f (diff) |
Move Heap parameters to ObjPtr
Deleted some unused object dumping code.
Test: test-art-host
Bug: 31113334
Change-Id: I747220caafe6679591fd4b361d7f50383a046164
Diffstat (limited to 'runtime/mirror/array-inl.h')
-rw-r--r-- | runtime/mirror/array-inl.h | 8 |
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_); |