summaryrefslogtreecommitdiffstats
path: root/runtime/thread.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2015-04-14 09:35:18 -0700
committerMathieu Chartier <mathieuc@google.com>2015-04-14 11:06:34 -0700
commit9086b65b2ad35dd39a8afc62d535be8217208d08 (patch)
tree3abc6e3297b840289bc240e3a9bc7e61b7a99cbc /runtime/thread.cc
parent8d20011a9de7cd94bee59db3ae8c0cbbf55911d9 (diff)
downloadart-9086b65b2ad35dd39a8afc62d535be8217208d08.tar.gz
art-9086b65b2ad35dd39a8afc62d535be8217208d08.tar.bz2
art-9086b65b2ad35dd39a8afc62d535be8217208d08.zip
Fix valgrind tests
Delete large objects in space destructor. Also some cleanup. Change-Id: I4c4e90149841a156b7a3236201b37683e14890fb
Diffstat (limited to 'runtime/thread.cc')
-rw-r--r--runtime/thread.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/thread.cc b/runtime/thread.cc
index ac3f08968..5ca51fbdd 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -1386,6 +1386,8 @@ void Thread::HandleScopeVisitRoots(RootVisitor* visitor, uint32_t thread_id) {
visitor, RootInfo(kRootNativeStack, thread_id));
for (HandleScope* cur = tlsPtr_.top_handle_scope; cur; cur = cur->GetLink()) {
for (size_t j = 0, count = cur->NumberOfReferences(); j < count; ++j) {
+ // GetReference returns a pointer to the stack reference within the handle scope. If this
+ // needs to be updated, it will be done by the root visitor.
buffered_visitor.VisitRootIfNonNull(cur->GetHandle(j).GetReference());
}
}
@@ -2312,6 +2314,7 @@ void Thread::VisitRoots(RootVisitor* visitor) {
ReleaseLongJumpContext(context);
for (instrumentation::InstrumentationStackFrame& frame : *GetInstrumentationStack()) {
visitor->VisitRootIfNonNull(&frame.this_object_, RootInfo(kRootVMInternal, thread_id));
+ DCHECK(frame.method_ != nullptr);
visitor->VisitRoot(reinterpret_cast<mirror::Object**>(&frame.method_),
RootInfo(kRootVMInternal, thread_id));
}