summaryrefslogtreecommitdiff
path: root/runtime/thread.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2013-12-19 14:59:00 -0800
committer Mathieu Chartier <mathieuc@google.com> 2013-12-19 15:14:42 -0800
commite8c48db6bb507d7fa20c78481c58c23be0045f67 (patch)
treeceac197a9d9f32609f845377e9fe87949bff5527 /runtime/thread.cc
parente40687d053b89c495b6fbeb7a766b01c9c7e039c (diff)
Fix NewLocalRef, NewGlobalRef to handle cleared weak globals.
We were not checking for null after decoding the reference, this meant that we incorrectly created null weak global references instead of returning null. Issue: 63929 Change-Id: I9159682e6edad8f415ef8144fc13b9aedd2cceb4
Diffstat (limited to 'runtime/thread.cc')
-rw-r--r--runtime/thread.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/thread.cc b/runtime/thread.cc
index bc252deecc..9faa60dbf8 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -1147,7 +1147,7 @@ mirror::Object* Thread::DecodeJObject(jobject obj) const {
result = Runtime::Current()->GetJavaVM()->DecodeWeakGlobal(const_cast<Thread*>(this), ref);
if (result == kClearedJniWeakGlobal) {
// This is a special case where it's okay to return NULL.
- return NULL;
+ return nullptr;
}
}