diff options
Diffstat (limited to 'runtime/debugger.cc')
-rw-r--r-- | runtime/debugger.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/debugger.cc b/runtime/debugger.cc index dc2ae2e215..e33966617f 100644 --- a/runtime/debugger.cc +++ b/runtime/debugger.cc @@ -1565,16 +1565,16 @@ JDWP::JdwpError Dbg::OutputDeclaredMethods(JDWP::RefTypeId class_id, bool with_g JDWP::JdwpError Dbg::OutputDeclaredInterfaces(JDWP::RefTypeId class_id, JDWP::ExpandBuf* pReply) { JDWP::JdwpError error; Thread* self = Thread::Current(); - StackHandleScope<1> hs(self); - Handle<mirror::Class> c(hs.NewHandle(DecodeClass(class_id, &error))); - if (c.Get() == nullptr) { + ObjPtr<mirror::Class> c = DecodeClass(class_id, &error); + if (c == nullptr) { return error; } size_t interface_count = c->NumDirectInterfaces(); expandBufAdd4BE(pReply, interface_count); for (size_t i = 0; i < interface_count; ++i) { - expandBufAddRefTypeId(pReply, - gRegistry->AddRefType(mirror::Class::GetDirectInterface(self, c, i))); + ObjPtr<mirror::Class> interface = mirror::Class::GetDirectInterface(self, c, i); + DCHECK(interface != nullptr); + expandBufAddRefTypeId(pReply, gRegistry->AddRefType(interface)); } return JDWP::ERR_NONE; } |