6959165: JVM crash during execution FileDialogBufferOverflowTest.html
authoranthony
Fri, 18 Jun 2010 17:09:28 +0400
changeset 5759 6d02dbbc2974
parent 5758 6fef7077b8a6
child 5760 4177643566d5
6959165: JVM crash during execution FileDialogBufferOverflowTest.html Summary: Add proper synchronization Reviewed-by: art, dcherepanov
jdk/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c
--- a/jdk/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c	Wed Jun 16 16:15:57 2010 +0100
+++ b/jdk/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c	Fri Jun 18 17:09:28 2010 +0400
@@ -52,11 +52,15 @@
 {
     if (dialog != NULL)
     {
+        fp_gdk_threads_enter();
+
         fp_gtk_widget_hide (dialog);
         fp_gtk_widget_destroy (dialog);
 
         fp_gtk_main_quit ();
         dialog = NULL;
+
+        fp_gdk_threads_leave();
     }
 }
 
@@ -162,7 +166,6 @@
         (*env)->GetJavaVM(env, &jvm);
     }
 
-    fp_gdk_threads_init();
     fp_gdk_threads_enter();
 
     const char *title = (*env)->GetStringUTFChars(env, jtitle, 0);