Mercurial > hg > release > icedtea8-forest-3.0 > jdk
changeset 10708:d730a66fe1ee
8068031: JNI exception pending in jdk/src/macosx/native/sun/awt/awt.m
Reviewed-by: serb, azvegint
author | alexsch |
---|---|
date | Fri, 23 Jan 2015 16:52:06 +0400 |
parents | bda04f4be837 |
children | 541cdea093a4 |
files | src/macosx/native/sun/awt/awt.m |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/macosx/native/sun/awt/awt.m Fri Jan 23 01:46:07 2015 +0400 +++ b/src/macosx/native/sun/awt/awt.m Fri Jan 23 16:52:06 2015 +0400 @@ -30,6 +30,7 @@ #import <JavaNativeFoundation/JavaNativeFoundation.h> #import <JavaRuntimeSupport/JavaRuntimeSupport.h> +#import "jni_util.h" #import "NSApplicationAWT.h" #import "PropertiesUtilities.h" #import "ThreadUtilities.h" @@ -436,8 +437,11 @@ } JNIEnv* env = [ThreadUtilities getJNIEnvUncached]; jclass jc_ThreadGroupUtils = (*env)->FindClass(env, "sun/misc/ThreadGroupUtils"); + CHECK_NULL_RETURN(jc_ThreadGroupUtils, JNI_VERSION_1_4); jmethodID sjm_getRootThreadGroup = (*env)->GetStaticMethodID(env, jc_ThreadGroupUtils, "getRootThreadGroup", "()Ljava/lang/ThreadGroup;"); + CHECK_NULL_RETURN(sjm_getRootThreadGroup, JNI_VERSION_1_4); jobject rootThreadGroup = (*env)->CallStaticObjectMethod(env, jc_ThreadGroupUtils, sjm_getRootThreadGroup); + CHECK_NULL_RETURN(rootThreadGroup, JNI_VERSION_1_4); [ThreadUtilities setAppkitThreadGroup:(*env)->NewGlobalRef(env, rootThreadGroup)]; // The current thread was attached in getJNIEnvUnchached. // Detach it back. It will be reattached later if needed with a proper TG