提交 ae7e40e7 编写于 作者: C ccheung

8034860: Fatal error due to incorrect thread state during nightly testing

Summary: use the HAS_PENDING_EXCEPTION and CLEAR_PENDING_EXCEPTION macros
Reviewed-by: dholmes, coleenp, dcubed
上级 45a1edfd
......@@ -36,20 +36,22 @@
#define WB_END JNI_END
#define WB_METHOD_DECLARE(result_type) extern "C" result_type JNICALL
#define CHECK_JNI_EXCEPTION_(env, value) \
do { \
if (env->ExceptionCheck()) { \
env->ExceptionClear(); \
return(value); \
} \
#define CHECK_JNI_EXCEPTION_(env, value) \
do { \
JavaThread* THREAD = JavaThread::thread_from_jni_environment(env); \
if (HAS_PENDING_EXCEPTION) { \
CLEAR_PENDING_EXCEPTION; \
return(value); \
} \
} while (0)
#define CHECK_JNI_EXCEPTION(env) \
do { \
if (env->ExceptionCheck()) { \
env->ExceptionClear(); \
return; \
} \
#define CHECK_JNI_EXCEPTION(env) \
do { \
JavaThread* THREAD = JavaThread::thread_from_jni_environment(env); \
if (HAS_PENDING_EXCEPTION) { \
CLEAR_PENDING_EXCEPTION; \
return; \
} \
} while (0)
class WhiteBox : public AllStatic {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册