diff options
author | Garfield Tan <xutan@google.com> | 2020-10-13 03:26:25 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-10-13 03:26:25 +0000 |
commit | 71a2fd0f21dd0b7ffbc0a745307961a9c6020fe6 (patch) | |
tree | aecfc125795e7251cba43b239ff6e24b2bb811aa | |
parent | 1795af68396aadc8c40fae11f26d990f26d57264 (diff) | |
parent | 8590c7925f77562c150ca4f05566872cd0311e8b (diff) | |
download | libchrome-71a2fd0f21dd0b7ffbc0a745307961a9c6020fe6.tar.gz |
Allow null exception reporter. am: 8590c7925f
Original change: https://android-review.googlesource.com/c/platform/external/libchrome/+/1454675
Change-Id: Ib3be31760a7140593f091a7c8585437ee5c417bd
-rw-r--r-- | base/android/java_exception_reporter.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/base/android/java_exception_reporter.cc b/base/android/java_exception_reporter.cc index 96eb38e581..be3e7039ac 100644 --- a/base/android/java_exception_reporter.cc +++ b/base/android/java_exception_reporter.cc @@ -38,8 +38,11 @@ void SetJavaExceptionCallback(void (*callback)(const char*)) { } void SetJavaException(const char* exception) { - DCHECK(g_java_exception_callback); - g_java_exception_callback(exception); + // No need to print exception because they are already logged via + // env->ExceptionDescribe() within jni_android.cc. + if (g_java_exception_callback) { + g_java_exception_callback(exception); + } } void JNI_JavaExceptionReporter_ReportJavaException( |