Home
last modified time | relevance | path

Searched refs:mEnv (Results 1 – 7 of 7) sorted by relevance

/libnativehelper/header_only_include/nativehelper/
Dscoped_local_ref.h29 ScopedLocalRef(JNIEnv* env, T localRef) : mEnv(env), mLocalRef(localRef) { in ScopedLocalRef()
32 ScopedLocalRef(ScopedLocalRef&& s) noexcept : mEnv(s.mEnv), mLocalRef(s.release()) { in ScopedLocalRef()
35 explicit ScopedLocalRef(JNIEnv* env) : mEnv(env), mLocalRef(nullptr) { in ScopedLocalRef()
45 mEnv->DeleteLocalRef(mLocalRef);
70 mEnv = s.mEnv;
85 JNIEnv* mEnv;
Dscoped_bytes.h33 : mEnv(env), mObject(object), mByteArray(nullptr), mPtr(nullptr) in ScopedBytes()
36 jniThrowNullPointerException(mEnv); in ScopedBytes()
39 if (mEnv->IsInstanceOf(mObject, byteArrayClass)) { in ScopedBytes()
41 mPtr = mEnv->GetByteArrayElements(mByteArray, nullptr); in ScopedBytes()
43 mPtr = reinterpret_cast<jbyte*>(mEnv->GetDirectBufferAddress(mObject)); in ScopedBytes()
45 mEnv->DeleteLocalRef(byteArrayClass); in ScopedBytes()
51 mEnv->ReleaseByteArrayElements(mByteArray, mPtr, readOnly ? JNI_ABORT : 0); in ~ScopedBytes()
56 JNIEnv* const mEnv;
Dscoped_primitive_array.h45 : mEnv(env), mJavaArray(nullptr), mRawArray(nullptr), mSize(0) {} \
47 : mEnv(env) { \
52 jniThrowNullPointerException(mEnv); \
59 mEnv->Release ## NAME ## ArrayElements(mJavaArray, mRawArray, JNI_ABORT); \
64 mSize = mEnv->GetArrayLength(mJavaArray); \
66 mEnv->Get ## NAME ## ArrayRegion(mJavaArray, 0, mSize, mBuffer); \
69 mRawArray = mEnv->Get ## NAME ## ArrayElements(mJavaArray, nullptr); \
78 JNIEnv* const mEnv; \
105 : mEnv(env), mJavaArray(nullptr), mRawArray(nullptr) {} \
107 : mEnv(env), mJavaArray(javaArray), mRawArray(nullptr) { \
[all …]
Dscoped_local_frame.h25 explicit ScopedLocalFrame(JNIEnv* env) : mEnv(env) { in ScopedLocalFrame()
26 mEnv->PushLocalFrame(128); in ScopedLocalFrame()
30 mEnv->PopLocalFrame(nullptr); in ~ScopedLocalFrame()
34 JNIEnv* const mEnv;
/libnativehelper/tests_mts/jni/
Dlibnativehelper_test.cpp22 int result = GetJavaVM()->GetEnv(reinterpret_cast<void**>(&mEnv), JNI_VERSION_1_6); in SetUp()
24 EXPECT_NE(nullptr, mEnv); in SetUp()
28 mEnv = nullptr; in TearDown()
Djni_invocation_test.cpp22 ASSERT_NE(nullptr, mEnv); in TEST_F()
29 ASSERT_EQ(JNI_OK, mEnv->GetJavaVM(&currentVM)); in TEST_F()
Dlibnativehelper_test.h28 JNIEnv* mEnv; variable