< prev index next >
src/hotspot/share/prims/jni.cpp
Print this page
rev 60632 : 8248670: Windows: Exception handling support on AArch64
Reviewed-by:
Contributed-by: mbeckwit, luhenry, burban
*** 91,101 ****
#include "jvmci/jvmciCompiler.hpp"
#endif
static jint CurrentVersion = JNI_VERSION_10;
! #ifdef _WIN32
extern LONG WINAPI topLevelExceptionFilter(_EXCEPTION_POINTERS* );
#endif
// The DT_RETURN_MARK macros create a scoped object to fire the dtrace
// '-return' probe regardless of the return path is taken out of the function.
--- 91,101 ----
#include "jvmci/jvmciCompiler.hpp"
#endif
static jint CurrentVersion = JNI_VERSION_10;
! #if defined(_WIN32) && !defined(USE_VECTORED_EXCEPTION_HANDLING)
extern LONG WINAPI topLevelExceptionFilter(_EXCEPTION_POINTERS* );
#endif
// The DT_RETURN_MARK macros create a scoped object to fire the dtrace
// '-return' probe regardless of the return path is taken out of the function.
*** 3839,3853 ****
}
_JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_CreateJavaVM(JavaVM **vm, void **penv, void *args) {
jint result = JNI_ERR;
// On Windows, let CreateJavaVM run with SEH protection
! #ifdef _WIN32
__try {
#endif
result = JNI_CreateJavaVM_inner(vm, penv, args);
! #ifdef _WIN32
} __except(topLevelExceptionFilter((_EXCEPTION_POINTERS*)_exception_info())) {
// Nothing to do.
}
#endif
return result;
--- 3839,3853 ----
}
_JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_CreateJavaVM(JavaVM **vm, void **penv, void *args) {
jint result = JNI_ERR;
// On Windows, let CreateJavaVM run with SEH protection
! #if defined(_WIN32) && !defined(USE_VECTORED_EXCEPTION_HANDLING)
__try {
#endif
result = JNI_CreateJavaVM_inner(vm, penv, args);
! #if defined(_WIN32) && !defined(USE_VECTORED_EXCEPTION_HANDLING)
} __except(topLevelExceptionFilter((_EXCEPTION_POINTERS*)_exception_info())) {
// Nothing to do.
}
#endif
return result;
*** 3911,3925 ****
}
jint JNICALL jni_DestroyJavaVM(JavaVM *vm) {
jint result = JNI_ERR;
// On Windows, we need SEH protection
! #ifdef _WIN32
__try {
#endif
result = jni_DestroyJavaVM_inner(vm);
! #ifdef _WIN32
} __except(topLevelExceptionFilter((_EXCEPTION_POINTERS*)_exception_info())) {
// Nothing to do.
}
#endif
return result;
--- 3911,3925 ----
}
jint JNICALL jni_DestroyJavaVM(JavaVM *vm) {
jint result = JNI_ERR;
// On Windows, we need SEH protection
! #if defined(_WIN32) && !defined(USE_VECTORED_EXCEPTION_HANDLING)
__try {
#endif
result = jni_DestroyJavaVM_inner(vm);
! #if defined(_WIN32) && !defined(USE_VECTORED_EXCEPTION_HANDLING)
} __except(topLevelExceptionFilter((_EXCEPTION_POINTERS*)_exception_info())) {
// Nothing to do.
}
#endif
return result;
< prev index next >