8032864: [macosx] sigsegv (0Xb) Being Generated When Starting JDev With Voiceover Running
authorpchelko
Tue, 22 Jul 2014 17:10:50 +0400
changeset 26000 7d2b9a7ae7ce
parent 25793 56060390dd25
child 26001 991e1be0b235
8032864: [macosx] sigsegv (0Xb) Being Generated When Starting JDev With Voiceover Running Reviewed-by: anthony, serb
jdk/src/macosx/native/sun/awt/JavaComponentAccessibility.m
--- a/jdk/src/macosx/native/sun/awt/JavaComponentAccessibility.m	Tue Jul 22 13:23:01 2014 +0400
+++ b/jdk/src/macosx/native/sun/awt/JavaComponentAccessibility.m	Tue Jul 22 17:10:50 2014 +0400
@@ -1108,7 +1108,10 @@
     JNIEnv *env = [ThreadUtilities getJNIEnv];
     id value = nil;
 
+    NSWindow* hostWindow = [[self->fView window] retain];
     jobject focused = JNFCallStaticObjectMethod(env, jm_getFocusOwner, fComponent); // AWT_THREADING Safe (AWTRunLoop)
+    [hostWindow release];
+    
     if (focused != NULL) {
         if (JNFIsInstanceOf(env, focused, &sjc_Accessible)) {
             value = [JavaComponentAccessibility createWithAccessible:focused withEnv:env withView:fView];