summaryrefslogtreecommitdiff
path: root/runtime/thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/thread.h')
-rw-r--r--runtime/thread.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/thread.h b/runtime/thread.h
index a46e799d72..e500e0b9e4 100644
--- a/runtime/thread.h
+++ b/runtime/thread.h
@@ -359,6 +359,7 @@ class Thread {
uint64_t GetCpuMicroTime() const;
mirror::Object* GetPeer() const REQUIRES_SHARED(Locks::mutator_lock_) {
+ DCHECK(Thread::Current() == this) << "Use GetPeerFromOtherThread instead";
CHECK(tlsPtr_.jpeer == nullptr);
return tlsPtr_.opeer;
}