8046887: JNI exception pending in jdk/src/solaris/native/sun/awt: awt_DrawingSurface.c, awt_GraphicsEnv.c, awt_InputMethod.c, sun_awt_X11_GtkFileDialogPeer.c
Reviewed-by: azvegint, prr
--- a/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c Wed Aug 13 21:45:53 2014 +0400
+++ b/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c Thu Aug 14 14:19:58 2014 +0100
@@ -1348,7 +1348,9 @@
}
/* Make Color Model object for this GraphicsConfiguration */
- colorModel = awtJNI_GetColorModel (env, adata);
+ colorModel = (*env)->ExceptionCheck(env)
+ ? NULL : awtJNI_GetColorModel (env, adata);
+
AWT_UNLOCK ();
return colorModel;
@@ -2052,7 +2054,7 @@
AWT_FLUSH_UNLOCK();
- if (!success) {
+ if (!success && !(*env)->ExceptionCheck(env)) {
JNU_ThrowInternalError(env, "Could not set display mode");
}
#endif /* !HEADLESS */
--- a/jdk/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c Wed Aug 13 21:45:53 2014 +0400
+++ b/jdk/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c Thu Aug 14 14:19:58 2014 +0100
@@ -246,8 +246,14 @@
}
str = (*env)->NewStringUTF(env, entry);
- if (str && !(*env)->ExceptionCheck(env)) {
+ if((*env)->ExceptionCheck(env)){
+ break;
+ }
+ if (str) {
(*env)->SetObjectArrayElement(env, array, i, str);
+ if((*env)->ExceptionCheck(env)){
+ break;
+ }
}
}