< prev index next >
src/hotspot/share/jvmci/jniAccessMark.inline.hpp
Print this page
*** 33,48 ****
// This performs a ThreadToNativeFromVM transition so that the VM
// will not be blocked if the call takes a long time (e.g., due
// to a GC in the shared library).
class JNIAccessMark : public StackObj {
private:
! ThreadToNativeFromVM ttnfv;
! HandleMark hm;
JNIEnv* _env;
public:
! inline JNIAccessMark(JVMCIEnv* jvmci_env) :
! ttnfv(JavaThread::current()), hm(JavaThread::current()) {
_env = jvmci_env->_env;
}
JNIEnv* env() const { return _env; }
JNIEnv* operator () () const { return _env; }
};
--- 33,48 ----
// This performs a ThreadToNativeFromVM transition so that the VM
// will not be blocked if the call takes a long time (e.g., due
// to a GC in the shared library).
class JNIAccessMark : public StackObj {
private:
! ThreadToNativeFromVM _ttnfv;
! HandleMark _hm;
JNIEnv* _env;
public:
! inline JNIAccessMark(JVMCIEnv* jvmci_env, JavaThread* thread=JavaThread::current()) :
! _ttnfv(thread), _hm(thread) {
_env = jvmci_env->_env;
}
JNIEnv* env() const { return _env; }
JNIEnv* operator () () const { return _env; }
};
< prev index next >