diff options
Diffstat (limited to 'runtime/verify_object-inl.h')
-rw-r--r-- | runtime/verify_object-inl.h | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/runtime/verify_object-inl.h b/runtime/verify_object-inl.h index 43151dd425..363fde220d 100644 --- a/runtime/verify_object-inl.h +++ b/runtime/verify_object-inl.h @@ -19,33 +19,11 @@ #include "verify_object.h" -#include "gc/heap.h" #include "mirror/object-inl.h" #include "obj_ptr-inl.h" namespace art { -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); - } 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.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); - } - } - } -} - inline bool VerifyClassClass(ObjPtr<mirror::Class> c) { if (UNLIKELY(c == nullptr)) { return false; |