diff options
author | 2016-10-06 15:13:58 -0700 | |
---|---|---|
committer | 2016-10-06 15:53:58 -0700 | |
commit | a058fdf0cf7435a13a6e8cae5e3a9bfa1513828d (patch) | |
tree | 85de1316f29f661372841d5feee16c370375fc16 /runtime/verify_object-inl.h | |
parent | c4f3925490a73da8dc74884a1deb965d4ecaf14e (diff) |
Move mirror::Object setters to ObjPtr
Bug: 31113334
Test: test-art-host
Change-Id: I2c4c84645e194c3c435a4a6fd670176b0e98671f
Diffstat (limited to 'runtime/verify_object-inl.h')
-rw-r--r-- | runtime/verify_object-inl.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/runtime/verify_object-inl.h b/runtime/verify_object-inl.h index f7a8249f19..4892b49533 100644 --- a/runtime/verify_object-inl.h +++ b/runtime/verify_object-inl.h @@ -21,31 +21,32 @@ #include "gc/heap.h" #include "mirror/object-inl.h" +#include "obj_ptr-inl.h" namespace art { -inline void VerifyObject(mirror::Object* obj) { +inline void VerifyObject(ObjPtr<mirror::Object> obj) { if (kVerifyObjectSupport > kVerifyObjectModeDisabled && obj != nullptr) { if (kVerifyObjectSupport > kVerifyObjectModeFast) { // Slow object verification, try the heap right away. - Runtime::Current()->GetHeap()->VerifyObjectBody(obj); + Runtime::Current()->GetHeap()->VerifyObjectBody(obj.Ptr()); } else { // Fast object verification, only call the heap if our quick sanity tests fail. The heap will // print the diagnostic message. - bool failed = !IsAligned<kObjectAlignment>(obj); + bool failed = !IsAligned<kObjectAlignment>(obj.Ptr()); if (!failed) { mirror::Class* c = obj->GetClass<kVerifyNone>(); failed = failed || !IsAligned<kObjectAlignment>(c); failed = failed || !VerifyClassClass(c); } if (UNLIKELY(failed)) { - Runtime::Current()->GetHeap()->VerifyObjectBody(obj); + Runtime::Current()->GetHeap()->VerifyObjectBody(obj.Ptr()); } } } } -inline bool VerifyClassClass(mirror::Class* c) { +inline bool VerifyClassClass(ObjPtr<mirror::Class> c) { if (UNLIKELY(c == nullptr)) { return false; } |