From 876b7d8fa8c587cccbe11bd30fcdb6c378776420 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Tue, 28 Apr 2015 16:30:30 -0700 Subject: Properly describe exception Previously we used DetachCurrentThread which raised a SIGABRT from within ART. The new approach is to use ExceptionDescribe and exit. Bug: 20640601 (cherry picked from commit d12065f581defd9e8199593e85aa2036a0713684) Change-Id: I00126b678ff296e0076247554af8328fe2767038 --- core/jni/android_util_Binder.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'core/jni') diff --git a/core/jni/android_util_Binder.cpp b/core/jni/android_util_Binder.cpp index cfbedda..fb82075 100644 --- a/core/jni/android_util_Binder.cpp +++ b/core/jni/android_util_Binder.cpp @@ -200,10 +200,8 @@ static void report_exception(JNIEnv* env, jthrowable excep, const char* msg) * that can be made while an exception is pending, so we want to * get the VM ptr, throw the exception, and then detach the thread. */ - JavaVM* vm = jnienv_to_javavm(env); env->Throw(excep); - vm->DetachCurrentThread(); - sleep(60); + env->ExceptionDescribe(); ALOGE("Forcefully exiting"); exit(1); } -- cgit v1.1