changeset 26343:cf09debe8a4b

8046894: JNI exception pending in jdk/src/solaris/native/sun/awt/X11Color.c Reviewed-by: azvegint, prr
author serb
date Tue, 12 Aug 2014 14:38:38 +0400
parents 3637212ae8f2
children 68c0e8209883
files jdk/src/solaris/native/sun/awt/X11Color.c jdk/src/solaris/native/sun/awt/awt.h
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)