8068033: JNI exception pending in jdk/src/share/bin/java.c
Reviewed-by: mchung, serb
This commit is contained in:
parent
004b407992
commit
bb5e8afcf2
jdk/src/java.base
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1059,6 +1059,7 @@ JVMInit(InvocationFunctions* ifn, jlong threadStackSize,
|
||||
void PostJVMInit(JNIEnv *env, jstring mainClass, JavaVM *vm) {
|
||||
jvmInstance = vm;
|
||||
SetMainClassForAWT(env, mainClass);
|
||||
CHECK_EXCEPTION_RETURN();
|
||||
ShowSplashScreen();
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -350,12 +350,6 @@ JLI_Launch(int argc, char ** argv, /* main argc, argc */
|
||||
} \
|
||||
} while (JNI_FALSE)
|
||||
|
||||
#define CHECK_EXCEPTION_RETURN() \
|
||||
do { \
|
||||
if ((*env)->ExceptionOccurred(env)) { \
|
||||
return; \
|
||||
} \
|
||||
} while (JNI_FALSE)
|
||||
|
||||
int JNICALL
|
||||
JavaMain(void * _args)
|
||||
@ -466,6 +460,7 @@ JavaMain(void * _args)
|
||||
* of the application class.
|
||||
*/
|
||||
PostJVMInit(env, appClass, vm);
|
||||
CHECK_EXCEPTION_LEAVE(1);
|
||||
/*
|
||||
* The LoadMainClass not only loads the main class, it will also ensure
|
||||
* that the main method's signature is correct, therefore further checking
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -254,4 +254,11 @@ typedef struct {
|
||||
#define NULL_CHECK(NC_check_pointer) \
|
||||
NULL_CHECK_RETURN_VALUE(NC_check_pointer, )
|
||||
|
||||
#define CHECK_EXCEPTION_RETURN() \
|
||||
do { \
|
||||
if ((*env)->ExceptionOccurred(env)) { \
|
||||
return; \
|
||||
} \
|
||||
} while (JNI_FALSE)
|
||||
|
||||
#endif /* _JAVA_H_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user