changeset 50883:896486c6e357

8189766: whitebox failure with -Xcheck:jni Reviewed-by: lfoltan, kbarrett
author dholmes
date Tue, 29 May 2018 17:21:31 -0400
parents 188a87cbfac3
children d11e87c8cd44
files src/hotspot/share/prims/whitebox.cpp
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/prims/whitebox.cpp	Tue May 29 16:02:23 2018 -0400
+++ b/src/hotspot/share/prims/whitebox.cpp	Tue May 29 17:21:31 2018 -0400
@@ -98,6 +98,7 @@
 #define CHECK_JNI_EXCEPTION_(env, value)                               \
   do {                                                                 \
     JavaThread* THREAD = JavaThread::thread_from_jni_environment(env); \
+    THREAD->clear_pending_jni_exception_check();                       \
     if (HAS_PENDING_EXCEPTION) {                                       \
       return(value);                                                   \
     }                                                                  \
@@ -106,6 +107,7 @@
 #define CHECK_JNI_EXCEPTION(env)                                       \
   do {                                                                 \
     JavaThread* THREAD = JavaThread::thread_from_jni_environment(env); \
+    THREAD->clear_pending_jni_exception_check();                       \
     if (HAS_PENDING_EXCEPTION) {                                       \
       return;                                                          \
     }                                                                  \