源码位置:art/runtime/jni/jni_env_ext.cc
头文件位置:art/runtime/jni/jni_env_ext.h
JNIEnvExt类
40 class JNIEnvExt : public JNIEnv {
实例化方法
-
Create
67 JNIEnvExt* JNIEnvExt::Create(Thread* self_in, JavaVMExt* vm_in, std::string* error_msg) { 68 std::unique_ptr<JNIEnvExt> ret(new JNIEnvExt(self_in, vm_in, error_msg)); 69 if (CheckLocalsValid(ret.get())) { 70 return ret.release(); 71 } 72 return nullptr; 73 }
方法调用位置:
Thread::Init
和Thread::CreateNativeThread
-
构造方法
75 JNIEnvExt::JNIEnvExt(Thread* self_in, JavaVMExt* vm_in, std::string* error_msg) 76 : self_(self_in), 77 vm_(vm_in), 78 local_ref_cookie_(kIRTFirstSegment), 79 locals_(kLocalsInitial, kLocal, IndirectReferenceTable::ResizableCapacity::kYes, error_msg), 80 monitors_("monitors", kMonitorsInitial, kMonitorsMax), 81 critical_(0), 82 check_jni_(false), 83 runtime_deleted_(false) { 84 MutexLock mu(Thread::Current(), *Locks::jni_function_table_lock_); 85 check_jni_ = vm_in->IsCheckJniEnabled(); 86 functions = GetFunctionTable(check_jni_); 87 unchecked_functions_ = GetJniNativeInterface(); 88 }
0 条评论