8034860: Fatal error due to incorrect thread state during nightly testing
Use the HAS_PENDING_EXCEPTION and CLEAR_PENDING_EXCEPTION macros Reviewed-by: dholmes, coleenp, dcubed
This commit is contained in:
parent
804e3ed06d
commit
297485c528
@ -36,20 +36,22 @@
|
|||||||
#define WB_END JNI_END
|
#define WB_END JNI_END
|
||||||
#define WB_METHOD_DECLARE(result_type) extern "C" result_type JNICALL
|
#define WB_METHOD_DECLARE(result_type) extern "C" result_type JNICALL
|
||||||
|
|
||||||
#define CHECK_JNI_EXCEPTION_(env, value) \
|
#define CHECK_JNI_EXCEPTION_(env, value) \
|
||||||
do { \
|
do { \
|
||||||
if (env->ExceptionCheck()) { \
|
JavaThread* THREAD = JavaThread::thread_from_jni_environment(env); \
|
||||||
env->ExceptionClear(); \
|
if (HAS_PENDING_EXCEPTION) { \
|
||||||
return(value); \
|
CLEAR_PENDING_EXCEPTION; \
|
||||||
} \
|
return(value); \
|
||||||
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define CHECK_JNI_EXCEPTION(env) \
|
#define CHECK_JNI_EXCEPTION(env) \
|
||||||
do { \
|
do { \
|
||||||
if (env->ExceptionCheck()) { \
|
JavaThread* THREAD = JavaThread::thread_from_jni_environment(env); \
|
||||||
env->ExceptionClear(); \
|
if (HAS_PENDING_EXCEPTION) { \
|
||||||
return; \
|
CLEAR_PENDING_EXCEPTION; \
|
||||||
} \
|
return; \
|
||||||
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
class WhiteBox : public AllStatic {
|
class WhiteBox : public AllStatic {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user