8170493: JNI exception pending in JavaComponentAccessibility.m
authorprr
Mon, 06 Feb 2017 09:32:41 -0800
changeset 43725 1f3f487b7f56
parent 43724 a272f9475e44
child 43726 7e7515c012c9
8170493: JNI exception pending in JavaComponentAccessibility.m Reviewed-by: serb, psadhukhan
jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m	Fri Feb 03 09:28:34 2017 -0800
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m	Mon Feb 06 09:32:41 2017 -0800
@@ -136,7 +136,7 @@
         fJavaRole = [javaRole retain];
 
         fAccessible = (*env)->NewWeakGlobalRef(env, accessible);
-        
+        (*env)->ExceptionClear(env); // in case of OOME
         jobject jcomponent = [(AWTView *)fView awtComponent:env];
         fComponent = (*env)->NewWeakGlobalRef(env, jcomponent);
         (*env)->DeleteLocalRef(env, jcomponent);