OSDN Git Service

Revert "Fix debugger calling new String()."
authorNicolas Geoffray <ngeoffray@google.com>
Wed, 24 Aug 2016 13:39:08 +0000 (13:39 +0000)
committerNicolas Geoffray <ngeoffray@google.com>
Wed, 24 Aug 2016 13:39:08 +0000 (13:39 +0000)
Bug: 30951794

This reverts commit f15ec05896ddc5fec1f224ef97bdfebb72b5a855.

Change-Id: Ie7fc565159a19a19a269099f21db833d470aef7c

runtime/debugger.cc

index b4acc27..2a5198b 100644 (file)
@@ -4098,17 +4098,10 @@ void Dbg::ExecuteMethodWithoutPendingException(ScopedObjectAccess& soa, DebugInv
     // unless we threw, in which case we return null.
     DCHECK_EQ(JDWP::JT_VOID, result_tag);
     if (exceptionObjectId == 0) {
-      if (m->GetDeclaringClass()->IsStringClass()) {
-        // For string constructors, the new string is remapped to the receiver (stored in ref).
-        mirror::Object* decoded_ref = soa.Self()->DecodeJObject(ref.get());
-        result_value = gRegistry->Add(decoded_ref);
-        result_tag = TagFromObject(soa, decoded_ref);
-      } else {
-        // TODO we could keep the receiver ObjectId in the DebugInvokeReq to avoid looking into the
-        // object registry.
-        result_value = GetObjectRegistry()->Add(pReq->receiver.Read());
-        result_tag = TagFromObject(soa, pReq->receiver.Read());
-      }
+      // TODO we could keep the receiver ObjectId in the DebugInvokeReq to avoid looking into the
+      // object registry.
+      result_value = GetObjectRegistry()->Add(pReq->receiver.Read());
+      result_tag = TagFromObject(soa, pReq->receiver.Read());
     } else {
       result_value = 0;
       result_tag = JDWP::JT_OBJECT;