Lines Matching refs:e

71     JNIEnv* e = reinterpret_cast<JNIEnv*>(env);  in findClass()  local
72 return (*env)->FindClass(e, className); in findClass()
78 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in jniRegisterNativeMethods() local
94 e->FatalError(msg); in jniRegisterNativeMethods()
97 if ((*env)->RegisterNatives(e, c.get(), gMethods, numMethods) < 0) { in jniRegisterNativeMethods()
106 e->FatalError(msg); in jniRegisterNativeMethods()
118 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in getExceptionSummary() local
121 … scoped_local_ref<jclass> exceptionClass(env, (*env)->GetObjectClass(e, exception)); // can't fail in getExceptionSummary()
123 (*env)->GetObjectClass(e, exceptionClass.get())); // java.lang.Class, can't fail in getExceptionSummary()
125 (*env)->GetMethodID(e, classClass.get(), "getName", "()Ljava/lang/String;"); in getExceptionSummary()
127 (jstring) (*env)->CallObjectMethod(e, exceptionClass.get(), classGetNameMethod)); in getExceptionSummary()
129 (*env)->ExceptionClear(e); in getExceptionSummary()
133 const char* classNameChars = (*env)->GetStringUTFChars(e, classNameStr.get(), NULL); in getExceptionSummary()
135 (*env)->ExceptionClear(e); in getExceptionSummary()
140 (*env)->ReleaseStringUTFChars(e, classNameStr.get(), classNameChars); in getExceptionSummary()
144 (*env)->GetMethodID(e, exceptionClass.get(), "getMessage", "()Ljava/lang/String;"); in getExceptionSummary()
146 (jstring) (*env)->CallObjectMethod(e, exception, getMessage)); in getExceptionSummary()
153 const char* messageChars = (*env)->GetStringUTFChars(e, messageStr.get(), NULL); in getExceptionSummary()
156 (*env)->ReleaseStringUTFChars(e, messageStr.get(), messageChars); in getExceptionSummary()
159 (*env)->ExceptionClear(e); // clear OOM in getExceptionSummary()
169 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in getStackTrace() local
176 jmethodID stringWriterCtor = (*env)->GetMethodID(e, stringWriterClass.get(), "<init>", "()V"); in getStackTrace()
178 (*env)->GetMethodID(e, stringWriterClass.get(), "toString", "()Ljava/lang/String;"); in getStackTrace()
186 (*env)->GetMethodID(e, printWriterClass.get(), "<init>", "(Ljava/io/Writer;)V"); in getStackTrace()
189 (*env)->NewObject(e, stringWriterClass.get(), stringWriterCtor)); in getStackTrace()
195 (*env)->NewObject(e, printWriterClass.get(), printWriterCtor, stringWriter.get())); in getStackTrace()
200 … scoped_local_ref<jclass> exceptionClass(env, (*env)->GetObjectClass(e, exception)); // can't fail in getStackTrace()
202 … (*env)->GetMethodID(e, exceptionClass.get(), "printStackTrace", "(Ljava/io/PrintWriter;)V"); in getStackTrace()
203 (*env)->CallVoidMethod(e, exception, printStackTraceMethod, printWriter.get()); in getStackTrace()
205 if ((*env)->ExceptionCheck(e)) { in getStackTrace()
210 (jstring) (*env)->CallObjectMethod(e, stringWriter.get(), stringWriterToStringMethod)); in getStackTrace()
215 const char* utfChars = (*env)->GetStringUTFChars(e, messageStr.get(), NULL); in getStackTrace()
222 (*env)->ReleaseStringUTFChars(e, messageStr.get(), utfChars); in getStackTrace()
227 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in jniThrowException() local
229 if ((*env)->ExceptionCheck(e)) { in jniThrowException()
231 scoped_local_ref<jthrowable> exception(env, (*env)->ExceptionOccurred(e)); in jniThrowException()
232 (*env)->ExceptionClear(e); in jniThrowException()
248 if ((*env)->ThrowNew(e, exceptionClass.get(), msg) != JNI_OK) { in jniThrowException()
278 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in jniGetStackTrace() local
280 scoped_local_ref<jthrowable> currentException(env, (*env)->ExceptionOccurred(e)); in jniGetStackTrace()
289 (*env)->ExceptionClear(e); in jniGetStackTrace()
294 (*env)->ExceptionClear(e); in jniGetStackTrace()
299 (*env)->Throw(e, currentException.get()); // rethrow in jniGetStackTrace()
328 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in jniCreateFileDescriptor() local
329 JniConstants::init(e); in jniCreateFileDescriptor()
330 static jmethodID ctor = e->GetMethodID(JniConstants::fileDescriptorClass, "<init>", "()V"); in jniCreateFileDescriptor()
331 jobject fileDescriptor = (*env)->NewObject(e, JniConstants::fileDescriptorClass, ctor); in jniCreateFileDescriptor()
341 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in jniGetFDFromFileDescriptor() local
342 JniConstants::init(e); in jniGetFDFromFileDescriptor()
343 static jfieldID fid = e->GetFieldID(JniConstants::fileDescriptorClass, "descriptor", "I"); in jniGetFDFromFileDescriptor()
345 return (*env)->GetIntField(e, fileDescriptor, fid); in jniGetFDFromFileDescriptor()
352 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in jniSetFileDescriptorOfFD() local
353 JniConstants::init(e); in jniSetFileDescriptorOfFD()
354 static jfieldID fid = e->GetFieldID(JniConstants::fileDescriptorClass, "descriptor", "I"); in jniSetFileDescriptorOfFD()
355 (*env)->SetIntField(e, fileDescriptor, fid, value); in jniSetFileDescriptorOfFD()
359 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in jniGetReferent() local
360 JniConstants::init(e); in jniGetReferent()
361 …static jmethodID get = e->GetMethodID(JniConstants::referenceClass, "get", "()Ljava/lang/Object;"); in jniGetReferent()
362 return (*env)->CallObjectMethod(e, ref, get); in jniGetReferent()