Remove abuse of mirror::Object* to reference special values.
Remove kInvalidIndirectRefObject, kClearedJniWeakGlobal and
ObjectRegistry::kInvalidObject. Handle error conditions by passing in or
returning an error value.
GetObjectRefType is simplified to be faster and not return invalid references
that are not expected according to the spec. Adjust check JNI and
jni_internal_test appropriately.
Fix cases in the debugger/JDWP of out arguments being passed by reference.
Bug: 17376993
Change-Id: I3ce8a28c01827e163f4dc288449959464da788b1
diff --git a/runtime/jdwp/jdwp_event.cc b/runtime/jdwp/jdwp_event.cc
index 36fbed4..fc39cc4 100644
--- a/runtime/jdwp/jdwp_event.cc
+++ b/runtime/jdwp/jdwp_event.cc
@@ -781,7 +781,7 @@
<< StringPrintf(" (requestId=%#" PRIx32 ")", pEvent->requestId);
}
std::string thread_name;
- JdwpError error = Dbg::GetThreadName(basket.threadId, thread_name);
+ JdwpError error = Dbg::GetThreadName(basket.threadId, &thread_name);
if (error != JDWP::ERR_NONE) {
thread_name = "<unknown>";
}
@@ -924,7 +924,7 @@
// Get instance type tag.
uint8_t tag;
- error = Dbg::GetObjectTag(thisPtr, tag);
+ error = Dbg::GetObjectTag(thisPtr, &tag);
if (error != ERR_NONE) {
return false;
}