8024779: [macosx] SwingNode crashes on exit
authorpchelko
Mon, 16 Sep 2013 19:38:32 +0400
changeset 20139 53e1e07a811e
parent 20138 7103851d7850
child 20140 b17201ff7e3f
8024779: [macosx] SwingNode crashes on exit Reviewed-by: anthony, ant
jdk/src/macosx/native/sun/awt/AWTView.m
jdk/src/macosx/native/sun/awt/AWTWindow.m
--- a/jdk/src/macosx/native/sun/awt/AWTView.m	Mon Sep 16 19:21:50 2013 +0400
+++ b/jdk/src/macosx/native/sun/awt/AWTView.m	Mon Sep 16 19:38:32 2013 +0400
@@ -126,7 +126,7 @@
 
     self.cglLayer = nil;
 
-    JNIEnv *env = [ThreadUtilities getJNIEnv];
+    JNIEnv *env = [ThreadUtilities getJNIEnvUncached];
     (*env)->DeleteGlobalRef(env, m_cPlatformView);
     m_cPlatformView = NULL;
 
--- a/jdk/src/macosx/native/sun/awt/AWTWindow.m	Mon Sep 16 19:21:50 2013 +0400
+++ b/jdk/src/macosx/native/sun/awt/AWTWindow.m	Mon Sep 16 19:38:32 2013 +0400
@@ -350,7 +350,7 @@
 - (void) dealloc {
 AWT_ASSERT_APPKIT_THREAD;
 
-    JNIEnv *env = [ThreadUtilities getJNIEnv];
+    JNIEnv *env = [ThreadUtilities getJNIEnvUncached];
     [self.javaPlatformWindow setJObject:nil withEnv:env];
 
     self.nsWindow = nil;