Skip to content

Commit

Permalink
8285399: JNI exception pending in awt_GraphicsEnv.c:1432
Browse files Browse the repository at this point in the history
Backport-of: c156bcc599534ae989bc9cbd001e7c150da8096c
  • Loading branch information
GoeLin committed Jan 2, 2023
1 parent c898a3e commit d1f6bd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/java.desktop/unix/native/common/awt/awt.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ extern void awt_output_flush();

#define AWT_LOCK_IMPL() \
do { \
if ((*env)->ExceptionCheck(env)) { \
(*env)->ExceptionClear(env); \
} \
(*env)->CallStaticVoidMethod(env, tkClass, awtLockMID); \
if ((*env)->ExceptionCheck(env)) { \
(*env)->ExceptionClear(env); \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1635,10 +1635,10 @@ Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals(JNIEnv *env,
AWT_FLUSH_UNLOCK();
for (i = 0; i < visScreenInfo->count; i++) {
XdbeVisualInfo* visInfo = visScreenInfo->visinfo;
(*env)->CallVoidMethod(env, this, midAddVisual, (visInfo[i]).visual);
if ((*env)->ExceptionCheck(env)) {
break;
}
(*env)->CallVoidMethod(env, this, midAddVisual, (visInfo[i]).visual);
}
AWT_LOCK();
XdbeFreeVisualInfo(visScreenInfo);
Expand Down

1 comment on commit d1f6bd1

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.