Bug 959237 - Define GetVM, GetJNIEnv, and GetJNIForThread as infallible; r=blassey
Currently when either of these methods fail, we log something and rely on the calling code to null check. Since these failures are serious and likely unrecoverable, it's better to define these methods as infallible and just crash if they do fail.
This commit is contained in:
@@ -968,10 +968,6 @@ nsJNIString::nsJNIString(jstring jstr, JNIEnv *jenv)
|
||||
JNIEnv *jni = jenv;
|
||||
if (!jni) {
|
||||
jni = AndroidBridge::GetJNIEnv();
|
||||
if (!jni) {
|
||||
SetIsVoid(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
const jchar* jCharPtr = jni->GetStringChars(jstr, nullptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user