Fix object verification.
Refactor VERIFY_OBJECT_ENABLED to become less brittle to change enum and global
constant.
Change-Id: Ie405106be81dce9a913730c7f46a5659582fa18b
diff --git a/src/thread-inl.h b/src/thread-inl.h
index 414b8d8..6c1ae59 100644
--- a/src/thread-inl.h
+++ b/src/thread-inl.h
@@ -124,6 +124,13 @@
return static_cast<ThreadState>(old_state);
}
+inline void Thread::VerifyStack() {
+ Heap* heap = Runtime::Current()->GetHeap();
+ if (heap->IsObjectValidationEnabled()) {
+ VerifyStackImpl();
+ }
+}
+
} // namespace art
#endif // ART_SRC_THREAD_INL_H_