src/share/vm/runtime/jniHandles.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7089790_headers_only Sdiff src/share/vm/runtime

src/share/vm/runtime/jniHandles.cpp

Print this page
rev 2694 : imported patch headers_only


  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/systemDictionary.hpp"
  27 #include "oops/oop.inline.hpp"
  28 #include "prims/jvmtiExport.hpp"
  29 #include "runtime/jniHandles.hpp"
  30 #include "runtime/mutexLocker.hpp"
  31 #ifdef TARGET_OS_FAMILY_linux
  32 # include "thread_linux.inline.hpp"
  33 #endif
  34 #ifdef TARGET_OS_FAMILY_solaris
  35 # include "thread_solaris.inline.hpp"
  36 #endif
  37 #ifdef TARGET_OS_FAMILY_windows
  38 # include "thread_windows.inline.hpp"
  39 #endif



  40 
  41 
  42 JNIHandleBlock* JNIHandles::_global_handles       = NULL;
  43 JNIHandleBlock* JNIHandles::_weak_global_handles  = NULL;
  44 oop             JNIHandles::_deleted_handle       = NULL;
  45 
  46 
  47 jobject JNIHandles::make_local(oop obj) {
  48   if (obj == NULL) {
  49     return NULL;                // ignore null handles
  50   } else {
  51     Thread* thread = Thread::current();
  52     assert(Universe::heap()->is_in_reserved(obj), "sanity check");
  53     return thread->active_handles()->allocate_handle(obj);
  54   }
  55 }
  56 
  57 
  58 // optimized versions
  59 




  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/systemDictionary.hpp"
  27 #include "oops/oop.inline.hpp"
  28 #include "prims/jvmtiExport.hpp"
  29 #include "runtime/jniHandles.hpp"
  30 #include "runtime/mutexLocker.hpp"
  31 #ifdef TARGET_OS_FAMILY_linux
  32 # include "thread_linux.inline.hpp"
  33 #endif
  34 #ifdef TARGET_OS_FAMILY_solaris
  35 # include "thread_solaris.inline.hpp"
  36 #endif
  37 #ifdef TARGET_OS_FAMILY_windows
  38 # include "thread_windows.inline.hpp"
  39 #endif
  40 #ifdef TARGET_OS_FAMILY_bsd
  41 # include "thread_bsd.inline.hpp"
  42 #endif
  43 
  44 
  45 JNIHandleBlock* JNIHandles::_global_handles       = NULL;
  46 JNIHandleBlock* JNIHandles::_weak_global_handles  = NULL;
  47 oop             JNIHandles::_deleted_handle       = NULL;
  48 
  49 
  50 jobject JNIHandles::make_local(oop obj) {
  51   if (obj == NULL) {
  52     return NULL;                // ignore null handles
  53   } else {
  54     Thread* thread = Thread::current();
  55     assert(Universe::heap()->is_in_reserved(obj), "sanity check");
  56     return thread->active_handles()->allocate_handle(obj);
  57   }
  58 }
  59 
  60 
  61 // optimized versions
  62 


src/share/vm/runtime/jniHandles.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File