8046894: JNI exception pending in jdk/src/solaris/native/sun/awt/X11Color.c
authorserb
Tue, 12 Aug 2014 14:38:38 +0400
changeset 26343 cf09debe8a4b
parent 26342 3637212ae8f2
child 26344 68c0e8209883
8046894: JNI exception pending in jdk/src/solaris/native/sun/awt/X11Color.c Reviewed-by: azvegint, prr
jdk/src/solaris/native/sun/awt/X11Color.c
jdk/src/solaris/native/sun/awt/awt.h
--- 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)