diff options
| author | 2017-02-10 10:59:22 +0000 | |
|---|---|---|
| committer | 2017-02-14 15:42:29 +0000 | |
| commit | ffc8cad04135192a8d10e7f38bd97c48101294a8 (patch) | |
| tree | fb90432ea5e6d218891c0b3fcccc0fa77d202f7d /runtime/thread.cc | |
| parent | 4e4b62e21672dbacf5d5abb688a126aabad29269 (diff) | |
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
Diffstat (limited to 'runtime/thread.cc')
| -rw-r--r-- | runtime/thread.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/thread.cc b/runtime/thread.cc index 7b6540436a..eba8975754 100644 --- a/runtime/thread.cc +++ b/runtime/thread.cc @@ -3485,7 +3485,8 @@ bool Thread::IsAotCompiler() { } mirror::Object* Thread::GetPeerFromOtherThread() const { - mirror::Object* peer = GetPeer(); + DCHECK(tlsPtr_.jpeer == nullptr); + mirror::Object* peer = tlsPtr_.opeer; if (kUseReadBarrier && Current()->GetIsGcMarking()) { // We may call Thread::Dump() in the middle of the CC thread flip and this thread's stack // may have not been flipped yet and peer may be a from-space (stale) ref. So explicitly |