summaryrefslogtreecommitdiff
path: root/runtime/monitor.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2014-06-10 18:21:32 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-06-10 18:21:32 +0000
commit5bf6a77944acdeb0a9464803c70d0c65cf15b68b (patch)
treeee66c89cf844201630b47eb0c0c438b88e3ab866 /runtime/monitor.cc
parent335b91fb98d8004580e9a58335a873a1874fa5a5 (diff)
parentbfd9a4378eacaf2dc2bbe05ad48c5164fc93c9fe (diff)
Merge "Change MethodHelper to use a Handle."
Diffstat (limited to 'runtime/monitor.cc')
-rw-r--r--runtime/monitor.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/runtime/monitor.cc b/runtime/monitor.cc
index f73ef1e3de..a19445b189 100644
--- a/runtime/monitor.cc
+++ b/runtime/monitor.cc
@@ -967,14 +967,13 @@ void Monitor::VisitLocks(StackVisitor* stack_visitor, void (*callback)(mirror::O
}
// <clinit> is another special case. The runtime holds the class lock while calling <clinit>.
- MethodHelper mh(m);
- if (mh.IsClassInitializer()) {
+ if (m->IsClassInitializer()) {
callback(m->GetDeclaringClass(), callback_context);
// Fall through because there might be synchronization in the user code too.
}
// Is there any reason to believe there's any synchronization in this method?
- const DexFile::CodeItem* code_item = mh.GetCodeItem();
+ const DexFile::CodeItem* code_item = m->GetCodeItem();
CHECK(code_item != NULL) << PrettyMethod(m);
if (code_item->tries_size_ == 0) {
return; // No "tries" implies no synchronization, so no held locks to report.
@@ -1048,12 +1047,11 @@ void Monitor::TranslateLocation(mirror::ArtMethod* method, uint32_t dex_pc,
*line_number = 0;
return;
}
- MethodHelper mh(method);
- *source_file = mh.GetDeclaringClassSourceFile();
+ *source_file = method->GetDeclaringClassSourceFile();
if (*source_file == NULL) {
*source_file = "";
}
- *line_number = mh.GetLineNumFromDexPC(dex_pc);
+ *line_number = method->GetLineNumFromDexPC(dex_pc);
}
uint32_t Monitor::GetOwnerThreadId() {