Allowing a Java object field to be null in a new JNI helper method.
Java objects in the API should be allowed to be null in some cases.
Specifically, a null value for maxBitrateBps in RtpParameters.java
has a specific meaning and doesn't imply an error has occurred.
NOTRY=True
Review URL: https://codereview.webrtc.org/1853523002
Cr-Commit-Position: refs/heads/master@{#12221}
diff --git a/webrtc/api/java/jni/jni_helpers.h b/webrtc/api/java/jni/jni_helpers.h
index 98dcc38..2832df1 100644
--- a/webrtc/api/java/jni/jni_helpers.h
+++ b/webrtc/api/java/jni/jni_helpers.h
@@ -64,8 +64,11 @@
jclass GetObjectClass(JNIEnv* jni, jobject object);
+// Throws an exception if the object field is null.
jobject GetObjectField(JNIEnv* jni, jobject object, jfieldID id);
+jobject GetNullableObjectField(JNIEnv* jni, jobject object, jfieldID id);
+
jstring GetStringField(JNIEnv* jni, jobject object, jfieldID id);
jlong GetLongField(JNIEnv* jni, jobject object, jfieldID id);