Add a DCHECK in thread::GetPeer.
Motivated by https://android-review.googlesource.com/#/c/333205/.
Test: test-art-host run-jdwp-test.sh
Change-Id: I173c060324aa0dc39144db55e3a97e672c012ba8
diff --git a/runtime/openjdkjvmti/ti_stack.cc b/runtime/openjdkjvmti/ti_stack.cc
index b5a6c6e..067c7c1 100644
--- a/runtime/openjdkjvmti/ti_stack.cc
+++ b/runtime/openjdkjvmti/ti_stack.cc
@@ -328,7 +328,7 @@
// For the time being, set the thread to null. We don't have good ScopedLocalRef
// infrastructure.
- DCHECK(self->GetPeer() != nullptr);
+ DCHECK(self->GetPeerFromOtherThread() != nullptr);
stack_info.thread = nullptr;
stack_info.state = JVMTI_THREAD_STATE_SUSPENDED;
@@ -495,7 +495,7 @@
// For the time being, set the thread to null. We don't have good ScopedLocalRef
// infrastructure.
- DCHECK(self->GetPeer() != nullptr);
+ DCHECK(self->GetPeerFromOtherThread() != nullptr);
stack_info.thread = nullptr;
stack_info.state = JVMTI_THREAD_STATE_SUSPENDED;