< prev index next >

src/hotspot/share/prims/jni.cpp

Print this page
*** 91,14 ***
  #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.
  // Methods that have multiple return paths use this to avoid having to
  // instrument each return path.  Methods that use CHECK or THROW must use this
  // since those macros can cause an immedate uninstrumented return.
--- 91,10 ---

*** 3691,11 ***
  }
  
  DT_RETURN_MARK_DECL(CreateJavaVM, jint
                      , HOTSPOT_JNI_CREATEJAVAVM_RETURN(_ret_ref));
  
! static jint JNI_CreateJavaVM_inner(JavaVM **vm, void **penv, void *args) {
    HOTSPOT_JNI_CREATEJAVAVM_ENTRY((void **) vm, penv, args);
  
    jint result = JNI_ERR;
    DT_RETURN_MARK(CreateJavaVM, jint, (const jint&)result);
  
--- 3687,11 ---
  }
  
  DT_RETURN_MARK_DECL(CreateJavaVM, jint
                      , HOTSPOT_JNI_CREATEJAVAVM_RETURN(_ret_ref));
  
! _JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_CreateJavaVM(JavaVM **vm, void **penv, void *args) {
    HOTSPOT_JNI_CREATEJAVAVM_ENTRY((void **) vm, penv, args);
  
    jint result = JNI_ERR;
    DT_RETURN_MARK(CreateJavaVM, jint, (const jint&)result);
  

*** 3826,25 ***
  
    return result;
  
  }
  
- _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;
- }
- 
  _JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_GetCreatedJavaVMs(JavaVM **vm_buf, jsize bufLen, jsize *numVMs) {
    // See bug 4367188, the wrapper can sometimes cause VM crashes
    // JNIWrapper("GetCreatedJavaVMs");
  
    HOTSPOT_JNI_GETCREATEDJAVAVMS_ENTRY((void **) vm_buf, bufLen, (uintptr_t *) numVMs);
--- 3822,10 ---

*** 3862,11 ***
  extern "C" {
  
  DT_RETURN_MARK_DECL(DestroyJavaVM, jint
                      , HOTSPOT_JNI_DESTROYJAVAVM_RETURN(_ret_ref));
  
! static jint JNICALL jni_DestroyJavaVM_inner(JavaVM *vm) {
    HOTSPOT_JNI_DESTROYJAVAVM_ENTRY(vm);
    jint res = JNI_ERR;
    DT_RETURN_MARK(DestroyJavaVM, jint, (const jint&)res);
  
    if (vm_created == 0) {
--- 3843,11 ---
  extern "C" {
  
  DT_RETURN_MARK_DECL(DestroyJavaVM, jint
                      , HOTSPOT_JNI_DESTROYJAVAVM_RETURN(_ret_ref));
  
! jint JNICALL jni_DestroyJavaVM(JavaVM *vm) {
    HOTSPOT_JNI_DESTROYJAVAVM_ENTRY(vm);
    jint res = JNI_ERR;
    DT_RETURN_MARK(DestroyJavaVM, jint, (const jint&)res);
  
    if (vm_created == 0) {

*** 3898,25 ***
      res = JNI_ERR;
      return res;
    }
  }
  
- 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;
- }
- 
  static jint attach_current_thread(JavaVM *vm, void **penv, void *_args, bool daemon) {
    JavaVMAttachArgs *args = (JavaVMAttachArgs *) _args;
  
    // Check below commented out from JDK1.2fcs as well
    /*
--- 3879,10 ---
< prev index next >