8046894: JNI exception pending in jdk/src/solaris/native/sun/awt/X11Color.c
Reviewed-by: azvegint, prr
--- a/jdk/src/solaris/native/sun/awt/X11Color.c Tue Aug 12 14:22:05 2014 +0400
+++ b/jdk/src/solaris/native/sun/awt/X11Color.c Tue Aug 12 14:38:38 2014 +0400
@@ -1377,7 +1377,7 @@
/* 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);
--- a/jdk/src/solaris/native/sun/awt/awt.h Tue Aug 12 14:22:05 2014 +0400
+++ b/jdk/src/solaris/native/sun/awt/awt.h Tue Aug 12 14:38:38 2014 +0400
@@ -75,6 +75,12 @@
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)