From 528954f55e3173b02df2822c1fc680873d6a91c8 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Wed, 24 Aug 2016 13:40:41 +0000 Subject: [PATCH] Revert "Fix debugger missing handle between adding and tagging object." Bug: 30951794 This reverts commit 9e0878494cdacd0877a1614041efc38ebb053017. Change-Id: I3fe1c7e466ae25a81cd37ee5a4aacb40b55686a1 --- runtime/debugger.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/debugger.cc b/runtime/debugger.cc index 89bebb4cc..b4acc27c4 100644 --- a/runtime/debugger.cc +++ b/runtime/debugger.cc @@ -4059,7 +4059,7 @@ void Dbg::ExecuteMethodWithoutPendingException(ScopedObjectAccess& soa, DebugInv // Prepare JDWP ids for the reply. JDWP::JdwpTag result_tag = BasicTagFromDescriptor(m->GetShorty()); const bool is_object_result = (result_tag == JDWP::JT_OBJECT); - StackHandleScope<3> hs(soa.Self()); + StackHandleScope<2> hs(soa.Self()); Handle object_result = hs.NewHandle(is_object_result ? result.GetL() : nullptr); Handle exception = hs.NewHandle(soa.Self()->GetException()); soa.Self()->ClearException(); @@ -4100,9 +4100,9 @@ void Dbg::ExecuteMethodWithoutPendingException(ScopedObjectAccess& soa, DebugInv if (exceptionObjectId == 0) { if (m->GetDeclaringClass()->IsStringClass()) { // For string constructors, the new string is remapped to the receiver (stored in ref). - Handle decoded_ref = hs.NewHandle(soa.Self()->DecodeJObject(ref.get())); + mirror::Object* decoded_ref = soa.Self()->DecodeJObject(ref.get()); result_value = gRegistry->Add(decoded_ref); - result_tag = TagFromObject(soa, decoded_ref.Get()); + result_tag = TagFromObject(soa, decoded_ref); } else { // TODO we could keep the receiver ObjectId in the DebugInvokeReq to avoid looking into the // object registry. -- 2.11.0