Index: base/android/jni_android.cc |
diff --git a/base/android/jni_android.cc b/base/android/jni_android.cc |
index 4db428ebf94786e6676ffd5e675166fa9475f21a..c342218bf4563f3a67048be9eba22b21127ce265 100644 |
--- a/base/android/jni_android.cc |
+++ b/base/android/jni_android.cc |
@@ -119,7 +119,9 @@ ScopedJavaLocalRef<jclass> GetClass(JNIEnv* env, const char* class_name) { |
} else { |
clazz = env->FindClass(class_name); |
} |
- CHECK(!ClearException(env) && clazz) << "Failed to find class " << class_name; |
+ if (ClearException(env) || !clazz) { |
+ LOG(FATAL) << "Failed to find class " << class_name; |
+ } |
return ScopedJavaLocalRef<jclass>(env, clazz); |
} |
@@ -156,10 +158,11 @@ jmethodID MethodID::Get(JNIEnv* env, |
jmethodID id = type == TYPE_STATIC ? |
env->GetStaticMethodID(clazz, method_name, jni_signature) : |
env->GetMethodID(clazz, method_name, jni_signature); |
- CHECK(base::android::ClearException(env) || id) << |
Yaron
2016/05/05 17:08:30
Am I crazy? Wasn't this inverted?
Torne
2016/05/05 17:33:22
Yes, this was inverted, you aren't crazy. It just
|
- "Failed to find " << |
- (type == TYPE_STATIC ? "static " : "") << |
- "method " << method_name << " " << jni_signature; |
+ if (base::android::ClearException(env) || !id) { |
+ LOG(FATAL) << "Failed to find " << |
+ (type == TYPE_STATIC ? "static " : "") << |
+ "method " << method_name << " " << jni_signature; |
+ } |
return id; |
} |
@@ -230,7 +233,7 @@ void CheckException(JNIEnv* env) { |
} |
// Now, feel good about it and die. |
- CHECK(false) << "Please include Java exception stack in crash report"; |
+ LOG(FATAL) << "Please include Java exception stack in crash report"; |
} |
std::string GetJavaExceptionInfo(JNIEnv* env, jthrowable java_throwable) { |