Commit d5d663f8 authored by Garfield Tan's avatar Garfield Tan Committed by Commit Bot

Allow null exception reporter.

libchrome in ARC++ runs without a java exception reporter. Logcat will
dump the information after an exception happens.

Bug: b:164205917
Test: build.
Change-Id: Id07dda246b8e63b52033cb961245281caa898b48
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2407252
Commit-Queue: Garfield Tan <xutan@chromium.org>
Reviewed-by: default avatarHidehiko Abe <hidehiko@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#806816}
parent 6d941748
......@@ -61,8 +61,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(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment