changeset 26000:7d2b9a7ae7ce

8032864: [macosx] sigsegv (0Xb) Being Generated When Starting JDev With Voiceover Running Reviewed-by: anthony, serb
author pchelko
date Tue, 22 Jul 2014 17:10:50 +0400
parents 56060390dd25
children 991e1be0b235
files jdk/src/macosx/native/sun/awt/JavaComponentAccessibility.m
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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];