diff options
author | 2016-10-14 18:43:19 -0700 | |
---|---|---|
committer | 2016-10-17 11:36:39 -0700 | |
commit | 31e88225b2ef68e7f32f11186acf922c74ddabab (patch) | |
tree | ca50f60634854056bb652e7c375e5ccca2def5cd /patchoat/patchoat.cc | |
parent | 602142692643d8cd2c48d9aaeece26470f702e3b (diff) |
Move most mirror:: args to ObjPtr
Fixed possible moving GC bugs in ClinitImageUpdate class.
Bug: 31113334
Test: test-art-host
Change-Id: I0bf6578553d58b944aaa17665f1350bdf5ed15ec
Diffstat (limited to 'patchoat/patchoat.cc')
-rw-r--r-- | patchoat/patchoat.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/patchoat/patchoat.cc b/patchoat/patchoat.cc index f3eb663cb8..d6ea18d648 100644 --- a/patchoat/patchoat.cc +++ b/patchoat/patchoat.cc @@ -715,15 +715,16 @@ bool PatchOat::PatchImage(bool primary_image) { } -void PatchOat::PatchVisitor::operator() (mirror::Object* obj, MemberOffset off, +void PatchOat::PatchVisitor::operator() (ObjPtr<mirror::Object> obj, + MemberOffset off, bool is_static_unused ATTRIBUTE_UNUSED) const { mirror::Object* referent = obj->GetFieldObject<mirror::Object, kVerifyNone>(off); mirror::Object* moved_object = patcher_->RelocatedAddressOfPointer(referent); copy_->SetFieldObjectWithoutWriteBarrier<false, true, kVerifyNone>(off, moved_object); } -void PatchOat::PatchVisitor::operator() (mirror::Class* cls ATTRIBUTE_UNUSED, - mirror::Reference* ref) const { +void PatchOat::PatchVisitor::operator() (ObjPtr<mirror::Class> cls ATTRIBUTE_UNUSED, + ObjPtr<mirror::Reference> ref) const { MemberOffset off = mirror::Reference::ReferentOffset(); mirror::Object* referent = ref->GetReferent(); DCHECK(referent == nullptr || |