mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-09 09:58:43 +00:00
8064698: [parfait] JNI exception pending in jdk/src/java/desktop/unix/native: libawt_xawt/awt/, common/awt
Reviewed-by: alexsch, serb
This commit is contained in:
parent
9b17d8dec8
commit
4d25e9dfce
@ -587,6 +587,7 @@ awtJNI_GetFontData(JNIEnv * env, jobject font, char **errmsg)
|
||||
Disposer_AddRecord(env, font, pDataDisposeMethod, ptr_to_jlong(fdata));
|
||||
return fdata;
|
||||
} else {
|
||||
JNU_CHECK_EXCEPTION_RETURN(env, NULL);
|
||||
Display *display = NULL;
|
||||
struct FontData *fdata = NULL;
|
||||
char fontSpec[1024];
|
||||
|
||||
@ -42,7 +42,7 @@ struct EventIDs eventIDs;
|
||||
JNIEXPORT void JNICALL
|
||||
Java_java_awt_Event_initIDs(JNIEnv *env, jclass cls)
|
||||
{
|
||||
eventIDs.data = (*env)->GetFieldID(env, cls, "data", "J");
|
||||
eventIDs.consumed = (*env)->GetFieldID(env, cls, "consumed", "Z");
|
||||
eventIDs.id = (*env)->GetFieldID(env, cls, "id", "I");
|
||||
CHECK_NULL(eventIDs.data = (*env)->GetFieldID(env, cls, "data", "J"));
|
||||
CHECK_NULL(eventIDs.consumed = (*env)->GetFieldID(env, cls, "consumed", "Z"));
|
||||
CHECK_NULL(eventIDs.id = (*env)->GetFieldID(env, cls, "id", "I"));
|
||||
}
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
#include "jni_util.h"
|
||||
#include "awt_p.h"
|
||||
#include "awt.h"
|
||||
#include "color.h"
|
||||
@ -763,6 +764,7 @@ awt_init_Display(JNIEnv *env, jobject this)
|
||||
XSetIOErrorHandler(xioerror_handler);
|
||||
JNU_CallStaticMethodByName(env, NULL, "sun/awt/X11/XErrorHandlerUtil", "init", "(J)V",
|
||||
ptr_to_jlong(awt_display));
|
||||
JNU_CHECK_EXCEPTION_RETURN(env, NULL);
|
||||
|
||||
/* set awt_numScreens, and whether or not we're using Xinerama */
|
||||
xineramaInit();
|
||||
@ -789,6 +791,7 @@ awt_init_Display(JNIEnv *env, jobject this)
|
||||
x11Screens[i].root = RootWindow(awt_display, i);
|
||||
}
|
||||
x11Screens[i].defaultConfig = makeDefaultConfig(env, i);
|
||||
JNU_CHECK_EXCEPTION_RETURN(env, NULL);
|
||||
}
|
||||
|
||||
return dpy;
|
||||
|
||||
@ -72,6 +72,11 @@ static gboolean filenameFilterCallback(const GtkFileFilterInfo * filter_info, gp
|
||||
|
||||
static void quit(JNIEnv * env, jobject jpeer, gboolean isSignalHandler)
|
||||
{
|
||||
jthrowable pendingException;
|
||||
if (pendingException = (*env)->ExceptionOccurred(env)) {
|
||||
(*env)->ExceptionClear(env);
|
||||
}
|
||||
|
||||
GtkWidget * dialog = (GtkWidget*)jlong_to_ptr(
|
||||
(*env)->GetLongField(env, jpeer, widgetFieldID));
|
||||
|
||||
@ -95,6 +100,10 @@ static void quit(JNIEnv * env, jobject jpeer, gboolean isSignalHandler)
|
||||
fp_gdk_threads_leave();
|
||||
}
|
||||
}
|
||||
|
||||
if (pendingException) {
|
||||
(*env)->Throw(env, pendingException);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user