< prev index next >

src/share/vm/prims/jniCheck.cpp

Print this page

        

@@ -85,11 +85,11 @@
 // Check for env being the one value appropriate for this thread.
 
 #define JNI_ENTRY_CHECKED(result_type, header)                           \
 extern "C" {                                                             \
   result_type JNICALL header {                                           \
-    JavaThread* thr = (JavaThread*)ThreadLocalStorage::get_thread_slow();\
+    JavaThread* thr = (JavaThread*) Thread::current_or_null();           \
     if (thr == NULL || !thr->is_Java_thread()) {                         \
       tty->print_cr("%s", fatal_using_jnienv_in_nonjava);                      \
       os::abort(true);                                                   \
     }                                                                    \
     JNIEnv* xenv = thr->jni_environment();                               \
< prev index next >