Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Unified Diff: webrtc/api/java/jni/jni_helpers.h

Issue 1853523002: Allowing a Java object field to be null in a new JNI helper method. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Adding comment around maxBitrateBps explaining null value. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/api/java/jni/jni_helpers.cc » ('j') | webrtc/api/java/jni/jni_helpers.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/java/jni/jni_helpers.h
diff --git a/webrtc/api/java/jni/jni_helpers.h b/webrtc/api/java/jni/jni_helpers.h
index 98dcc38b5348b4ad8157cb6752711ed0e438388a..2832df14b3be71cb0ec7cd6d363a4ce6d417bd4f 100644
--- a/webrtc/api/java/jni/jni_helpers.h
+++ b/webrtc/api/java/jni/jni_helpers.h
@@ -64,8 +64,11 @@ jfieldID GetFieldID(JNIEnv* jni, jclass c, const char* name,
jclass GetObjectClass(JNIEnv* jni, jobject object);
+// Throws an exception if the object field is null.
pthatcher1 2016/04/11 19:39:29 Doesn't the code actually crash?
Taylor Brandstetter 2016/04/11 23:13:38 Oh yeah. It calls abort(). I'll make a CL to fix t
jobject GetObjectField(JNIEnv* jni, jobject object, jfieldID id);
pthatcher1 2016/04/11 19:39:29 Can we rename this one GetNonNullObjectField to ma
Taylor Brandstetter 2016/04/11 23:13:38 Since you, Vlad and I prefer that naming, it seems
+jobject GetNullableObjectField(JNIEnv* jni, jobject object, jfieldID id);
+
jstring GetStringField(JNIEnv* jni, jobject object, jfieldID id);
jlong GetLongField(JNIEnv* jni, jobject object, jfieldID id);
« no previous file with comments | « no previous file | webrtc/api/java/jni/jni_helpers.cc » ('j') | webrtc/api/java/jni/jni_helpers.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698