summaryrefslogtreecommitdiff
path: root/runtime/scoped_thread_state_change.h
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2019-07-23 16:39:21 -0700
committer Treehugger Robot <treehugger-gerrit@google.com> 2019-07-24 19:06:29 +0000
commit1b0fcf495e652cabaa8e65b8bf67284ca15f6485 (patch)
tree5f67feca58ca2bd390ac8aa18eca17b99889186a /runtime/scoped_thread_state_change.h
parent1cbac5c38ca1cb9bbdf3bc1489701a9c841764fe (diff)
ART: Fix ScopedThreadStateChange assert
Ensure that an early abort will not trigger a nested (infinite) failure. Also move the check into the body to avoid polluting the header with a very uncommon case. Test: mmma art Test: manual (run-test with 1.5GB heap) Change-Id: I85e7a5ba2e01d1762ffc5c264eee20a0c81c0b7f
Diffstat (limited to 'runtime/scoped_thread_state_change.h')
-rw-r--r--runtime/scoped_thread_state_change.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/scoped_thread_state_change.h b/runtime/scoped_thread_state_change.h
index b2ad90a1ea..08cb5b4689 100644
--- a/runtime/scoped_thread_state_change.h
+++ b/runtime/scoped_thread_state_change.h
@@ -58,6 +58,8 @@ class ScopedThreadStateChange : public ValueObject {
const ThreadState thread_state_ = kTerminated;
private:
+ void ScopedThreadChangeDestructorCheck();
+
ThreadState old_thread_state_ = kTerminated;
const bool expected_has_no_thread_ = true;