Fix more JDWP bugs.

Change-Id: I475d14e196a7463e70f7cce6a8b8d77f867e9e46
diff --git a/src/debugger.cc b/src/debugger.cc
index 4c47e00..40405eb 100644
--- a/src/debugger.cc
+++ b/src/debugger.cc
@@ -612,13 +612,14 @@
   return 0;
 }
 
-bool Dbg::GetSignature(JDWP::RefTypeId refTypeId, std::string& signature) {
-  Object* o = gRegistry->Get<Object*>(refTypeId);
-  if (o == NULL || !o->IsClass()) {
-    return false;
+JDWP::JdwpError Dbg::GetSignature(JDWP::RefTypeId refTypeId, std::string& signature) {
+  JDWP::JdwpError status;
+  Class* c = DecodeClass(refTypeId, status);
+  if (c == NULL) {
+    return status;
   }
-  signature = ClassHelper(o->AsClass()).GetDescriptor();
-  return true;
+  signature = ClassHelper(c).GetDescriptor();
+  return JDWP::ERR_NONE;
 }
 
 bool Dbg::GetSourceFile(JDWP::RefTypeId refTypeId, std::string& result) {