hotspot/src/share/vm/prims/jniCheck.cpp
changeset 34633 2a6c7c7b30a7
parent 33611 9abd65805e19
child 36508 5f9eee6b383b
equal deleted inserted replaced
34632:bf3518bba285 34633:2a6c7c7b30a7
    85 // Check for env being the one value appropriate for this thread.
    85 // Check for env being the one value appropriate for this thread.
    86 
    86 
    87 #define JNI_ENTRY_CHECKED(result_type, header)                           \
    87 #define JNI_ENTRY_CHECKED(result_type, header)                           \
    88 extern "C" {                                                             \
    88 extern "C" {                                                             \
    89   result_type JNICALL header {                                           \
    89   result_type JNICALL header {                                           \
    90     JavaThread* thr = (JavaThread*)ThreadLocalStorage::get_thread_slow();\
    90     JavaThread* thr = (JavaThread*) Thread::current_or_null();           \
    91     if (thr == NULL || !thr->is_Java_thread()) {                         \
    91     if (thr == NULL || !thr->is_Java_thread()) {                         \
    92       tty->print_cr("%s", fatal_using_jnienv_in_nonjava);                      \
    92       tty->print_cr("%s", fatal_using_jnienv_in_nonjava);                \
    93       os::abort(true);                                                   \
    93       os::abort(true);                                                   \
    94     }                                                                    \
    94     }                                                                    \
    95     JNIEnv* xenv = thr->jni_environment();                               \
    95     JNIEnv* xenv = thr->jni_environment();                               \
    96     if (env != xenv) {                                                   \
    96     if (env != xenv) {                                                   \
    97       NativeReportJNIFatalError(thr, warn_wrong_jnienv);                 \
    97       NativeReportJNIFatalError(thr, warn_wrong_jnienv);                 \