Lines Matching refs:e

62     JNIEnv* e = reinterpret_cast<JNIEnv*>(env);  in findClass()  local
63 return (*env)->FindClass(e, className); in findClass()
69 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in jniRegisterNativeMethods() local
78 int result = e->RegisterNatives(c.get(), gMethods, numMethods); in jniRegisterNativeMethods()
91 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in getExceptionSummary() local
94 … scoped_local_ref<jclass> exceptionClass(env, (*env)->GetObjectClass(e, exception)); // can't fail in getExceptionSummary()
96 (*env)->GetObjectClass(e, exceptionClass.get())); // java.lang.Class, can't fail in getExceptionSummary()
98 (*env)->GetMethodID(e, classClass.get(), "getName", "()Ljava/lang/String;"); in getExceptionSummary()
100 (jstring) (*env)->CallObjectMethod(e, exceptionClass.get(), classGetNameMethod)); in getExceptionSummary()
102 (*env)->ExceptionClear(e); in getExceptionSummary()
106 const char* classNameChars = (*env)->GetStringUTFChars(e, classNameStr.get(), NULL); in getExceptionSummary()
108 (*env)->ExceptionClear(e); in getExceptionSummary()
113 (*env)->ReleaseStringUTFChars(e, classNameStr.get(), classNameChars); in getExceptionSummary()
117 (*env)->GetMethodID(e, exceptionClass.get(), "getMessage", "()Ljava/lang/String;"); in getExceptionSummary()
119 (jstring) (*env)->CallObjectMethod(e, exception, getMessage)); in getExceptionSummary()
126 const char* messageChars = (*env)->GetStringUTFChars(e, messageStr.get(), NULL); in getExceptionSummary()
129 (*env)->ReleaseStringUTFChars(e, messageStr.get(), messageChars); in getExceptionSummary()
132 (*env)->ExceptionClear(e); // clear OOM in getExceptionSummary()
142 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in getStackTrace() local
149 jmethodID stringWriterCtor = (*env)->GetMethodID(e, stringWriterClass.get(), "<init>", "()V"); in getStackTrace()
151 (*env)->GetMethodID(e, stringWriterClass.get(), "toString", "()Ljava/lang/String;"); in getStackTrace()
159 (*env)->GetMethodID(e, printWriterClass.get(), "<init>", "(Ljava/io/Writer;)V"); in getStackTrace()
162 (*env)->NewObject(e, stringWriterClass.get(), stringWriterCtor)); in getStackTrace()
168 (*env)->NewObject(e, printWriterClass.get(), printWriterCtor, stringWriter.get())); in getStackTrace()
173 … scoped_local_ref<jclass> exceptionClass(env, (*env)->GetObjectClass(e, exception)); // can't fail in getStackTrace()
175 … (*env)->GetMethodID(e, exceptionClass.get(), "printStackTrace", "(Ljava/io/PrintWriter;)V"); in getStackTrace()
176 (*env)->CallVoidMethod(e, exception, printStackTraceMethod, printWriter.get()); in getStackTrace()
178 if ((*env)->ExceptionCheck(e)) { in getStackTrace()
183 (jstring) (*env)->CallObjectMethod(e, stringWriter.get(), stringWriterToStringMethod)); in getStackTrace()
188 const char* utfChars = (*env)->GetStringUTFChars(e, messageStr.get(), NULL); in getStackTrace()
195 (*env)->ReleaseStringUTFChars(e, messageStr.get(), utfChars); in getStackTrace()
200 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in jniThrowException() local
202 if ((*env)->ExceptionCheck(e)) { in jniThrowException()
204 scoped_local_ref<jthrowable> exception(env, (*env)->ExceptionOccurred(e)); in jniThrowException()
205 (*env)->ExceptionClear(e); in jniThrowException()
221 if ((*env)->ThrowNew(e, exceptionClass.get(), msg) != JNI_OK) { in jniThrowException()
251 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in jniGetStackTrace() local
253 scoped_local_ref<jthrowable> currentException(env, (*env)->ExceptionOccurred(e)); in jniGetStackTrace()
262 (*env)->ExceptionClear(e); in jniGetStackTrace()
267 (*env)->ExceptionClear(e); in jniGetStackTrace()
272 (*env)->Throw(e, currentException.get()); // rethrow in jniGetStackTrace()
323 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in jniCreateFileDescriptor() local
324 jobject fileDescriptor = e->NewObject(JniConstants::GetFileDescriptorClass(e), in jniCreateFileDescriptor()
325 JniConstants::GetFileDescriptorInitMethod(e)); in jniCreateFileDescriptor()
335 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in jniGetFDFromFileDescriptor() local
337 return e->GetIntField(fileDescriptor, in jniGetFDFromFileDescriptor()
338 JniConstants::GetFileDescriptorDescriptorField(e)); in jniGetFDFromFileDescriptor()
345 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in jniSetFileDescriptorOfFD() local
347 jniThrowNullPointerException(e, "null FileDescriptor"); in jniSetFileDescriptorOfFD()
349 e->SetIntField(fileDescriptor, JniConstants::GetFileDescriptorDescriptorField(e), value); in jniSetFileDescriptorOfFD()
354 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in jniGetOwnerIdFromFileDescriptor() local
355 return e->GetLongField(fileDescriptor, JniConstants::GetFileDescriptorOwnerIdField(e)); in jniGetOwnerIdFromFileDescriptor()
359 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in jniGetNioBufferBaseArray() local
360 jclass nioAccessClass = JniConstants::GetNioAccessClass(e); in jniGetNioBufferBaseArray()
361 jmethodID getBaseArrayMethod = JniConstants::GetNioAccessGetBaseArrayMethod(e); in jniGetNioBufferBaseArray()
362 jobject object = e->CallStaticObjectMethod(nioAccessClass, getBaseArrayMethod, nioBuffer); in jniGetNioBufferBaseArray()
367 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in jniGetNioBufferBaseArrayOffset() local
368 jclass nioAccessClass = JniConstants::GetNioAccessClass(e); in jniGetNioBufferBaseArrayOffset()
369 jmethodID getBaseArrayOffsetMethod = JniConstants::GetNioAccessGetBaseArrayOffsetMethod(e); in jniGetNioBufferBaseArrayOffset()
370 return e->CallStaticIntMethod(nioAccessClass, getBaseArrayOffsetMethod, nioBuffer); in jniGetNioBufferBaseArrayOffset()
374 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in jniGetNioBufferPointer() local
375 jlong baseAddress = e->GetLongField(nioBuffer, JniConstants::GetNioBufferAddressField(e)); in jniGetNioBufferPointer()
377 const int position = e->GetIntField(nioBuffer, JniConstants::GetNioBufferPositionField(e)); in jniGetNioBufferPointer()
379 e->GetIntField(nioBuffer, JniConstants::GetNioBufferElementSizeShiftField(e)); in jniGetNioBufferPointer()
387 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in jniGetNioBufferFields() local
388 *position = e->GetIntField(nioBuffer, JniConstants::GetNioBufferPositionField(e)); in jniGetNioBufferFields()
389 *limit = e->GetIntField(nioBuffer, JniConstants::GetNioBufferLimitField(e)); in jniGetNioBufferFields()
391 e->GetIntField(nioBuffer, JniConstants::GetNioBufferElementSizeShiftField(e)); in jniGetNioBufferFields()
392 return e->GetLongField(nioBuffer, JniConstants::GetNioBufferAddressField(e)); in jniGetNioBufferFields()
396 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in jniGetReferent() local
397 return e->CallObjectMethod(ref, JniConstants::GetReferenceGetMethod(e)); in jniGetReferent()
401 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in jniCreateString() local
402 return e->NewString(unicodeChars, len); in jniCreateString()