mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-26 00:17:47 -10:00
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:
1 parent
15d29504c5
commit
d1f525e06a
10 files changed
+27
-149
No files matched your search
@@ -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