From cc3bab515d5d9d7c79285b534016219fe6fd7250 Mon Sep 17 00:00:00 2001 From: serb Date: Tue, 12 Aug 2014 14:38:38 +0400 Subject: [PATCH] 8046894: JNI exception pending in jdk/src/solaris/native/sun/awt/X11Color.c Reviewed-by: azvegint, prr --- src/solaris/native/sun/awt/X11Color.c | 2 +- src/solaris/native/sun/awt/awt.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/solaris/native/sun/awt/X11Color.c b/src/solaris/native/sun/awt/X11Color.c index a1fdc5844..e7bf05b74 100644 --- a/src/solaris/native/sun/awt/X11Color.c +++ b/src/solaris/native/sun/awt/X11Color.c @@ -1377,7 +1377,7 @@ awtJNI_CreateColorData(JNIEnv *env, AwtGraphicsConfigDataPtr adata, /* Unlock now to initialize the SystemColor class */ if (lock) { - AWT_UNLOCK (); + AWT_UNLOCK_CHECK_EXCEPTION(env); } sysColors = (*env)->FindClass (env, "java/awt/SystemColor"); CHECK_NULL(sysColors); diff --git a/src/solaris/native/sun/awt/awt.h b/src/solaris/native/sun/awt/awt.h index b61133831..df5f60300 100644 --- a/src/solaris/native/sun/awt/awt.h +++ b/src/solaris/native/sun/awt/awt.h @@ -75,6 +75,12 @@ extern void awt_output_flush(); AWT_NOFLUSH_UNLOCK(); \ } while (0) +#define AWT_UNLOCK_CHECK_EXCEPTION(env) \ + do { \ + AWT_UNLOCK(); \ + JNU_CHECK_EXCEPTION(env); \ + } while (0) + #define AWT_LOCK_IMPL() \ (*env)->CallStaticVoidMethod(env, tkClass, awtLockMID) -- GitLab