diff options
Diffstat (limited to 'runtime/jni_internal.cc')
-rw-r--r-- | runtime/jni_internal.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/jni_internal.cc b/runtime/jni_internal.cc index 658cb758a4..8c9a3b02ba 100644 --- a/runtime/jni_internal.cc +++ b/runtime/jni_internal.cc @@ -2255,8 +2255,10 @@ class JNI { java_buffer, WellKnownClasses::java_nio_DirectByteBuffer_capacity)); } - static jobjectRefType GetObjectRefType(JNIEnv* env, jobject java_object) { - CHECK_NON_NULL_ARGUMENT_RETURN(java_object, JNIInvalidRefType); + static jobjectRefType GetObjectRefType(JNIEnv* env ATTRIBUTE_UNUSED, jobject java_object) { + if (java_object == nullptr) { + return JNIInvalidRefType; + } // Do we definitely know what kind of reference this is? IndirectRef ref = reinterpret_cast<IndirectRef>(java_object); @@ -2273,7 +2275,7 @@ class JNI { return JNILocalRefType; } LOG(FATAL) << "IndirectRefKind[" << kind << "]"; - return JNIInvalidRefType; + UNREACHABLE(); } private: |