summaryrefslogtreecommitdiffstats
path: root/src/thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread.cc')
-rw-r--r--src/thread.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/thread.cc b/src/thread.cc
index 525e2a1..c90c745 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -303,16 +303,18 @@ Object* Thread::DecodeJObject(jobject obj) {
// Assume an invalid local reference is actually a direct pointer.
result = reinterpret_cast<Object*>(obj);
} else {
- LOG(FATAL) << "Invalid indirect reference " << obj;
- result = reinterpret_cast<Object*>(kInvalidIndirectRefObject);
+ result = kInvalidIndirectRefObject;
}
}
if (result == NULL) {
- LOG(FATAL) << "JNI ERROR (app bug): use of deleted " << kind << ": "
- << obj;
+ LOG(ERROR) << "JNI ERROR (app bug): use of deleted " << kind << ": " << obj;
+ JniAbort(NULL);
+ } else {
+ if (result != kInvalidIndirectRefObject) {
+ Heap::VerifyObject(result);
+ }
}
- Heap::VerifyObject(result);
return result;
}