ObjPtr<>-ify mirror::Object::As*(), fix stale refs in test.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 31113334
Change-Id: Ia04c4996f5cbfa1f26acbadcd747342c57b1aac3
diff --git a/runtime/thread.h b/runtime/thread.h
index 085bd98..7c8ad24 100644
--- a/runtime/thread.h
+++ b/runtime/thread.h
@@ -395,7 +395,7 @@
}
// Returns the java.lang.Thread's name, or null if this Thread* doesn't have a peer.
- mirror::String* GetThreadName() const REQUIRES_SHARED(Locks::mutator_lock_);
+ ObjPtr<mirror::String> GetThreadName() const REQUIRES_SHARED(Locks::mutator_lock_);
// Sets 'name' to the java.lang.Thread's name. This requires no transition to managed code,
// allocation, or locking.