Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 57 JNIEnv* jni, jclass c, const std::string& name, const char* signature); | 57 JNIEnv* jni, jclass c, const std::string& name, const char* signature); |
| 58 | 58 |
| 59 jmethodID GetStaticMethodID( | 59 jmethodID GetStaticMethodID( |
| 60 JNIEnv* jni, jclass c, const char* name, const char* signature); | 60 JNIEnv* jni, jclass c, const char* name, const char* signature); |
| 61 | 61 |
| 62 jfieldID GetFieldID(JNIEnv* jni, jclass c, const char* name, | 62 jfieldID GetFieldID(JNIEnv* jni, jclass c, const char* name, |
| 63 const char* signature); | 63 const char* signature); |
| 64 | 64 |
| 65 jclass GetObjectClass(JNIEnv* jni, jobject object); | 65 jclass GetObjectClass(JNIEnv* jni, jobject object); |
| 66 | 66 |
| 67 // 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
| |
| 67 jobject GetObjectField(JNIEnv* jni, jobject object, jfieldID id); | 68 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
| |
| 68 | 69 |
| 70 jobject GetNullableObjectField(JNIEnv* jni, jobject object, jfieldID id); | |
| 71 | |
| 69 jstring GetStringField(JNIEnv* jni, jobject object, jfieldID id); | 72 jstring GetStringField(JNIEnv* jni, jobject object, jfieldID id); |
| 70 | 73 |
| 71 jlong GetLongField(JNIEnv* jni, jobject object, jfieldID id); | 74 jlong GetLongField(JNIEnv* jni, jobject object, jfieldID id); |
| 72 | 75 |
| 73 jint GetIntField(JNIEnv* jni, jobject object, jfieldID id); | 76 jint GetIntField(JNIEnv* jni, jobject object, jfieldID id); |
| 74 | 77 |
| 75 bool GetBooleanField(JNIEnv* jni, jobject object, jfieldID id); | 78 bool GetBooleanField(JNIEnv* jni, jobject object, jfieldID id); |
| 76 | 79 |
| 77 // Returns true if |obj| == null in Java. | 80 // Returns true if |obj| == null in Java. |
| 78 bool IsNull(JNIEnv* jni, jobject obj); | 81 bool IsNull(JNIEnv* jni, jobject obj); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 179 private: | 182 private: |
| 180 JNIEnv* jni_; | 183 JNIEnv* jni_; |
| 181 jobject iterable_; | 184 jobject iterable_; |
| 182 | 185 |
| 183 RTC_DISALLOW_COPY_AND_ASSIGN(Iterable); | 186 RTC_DISALLOW_COPY_AND_ASSIGN(Iterable); |
| 184 }; | 187 }; |
| 185 | 188 |
| 186 } // namespace webrtc_jni | 189 } // namespace webrtc_jni |
| 187 | 190 |
| 188 #endif // WEBRTC_API_JAVA_JNI_JNI_HELPERS_H_ | 191 #endif // WEBRTC_API_JAVA_JNI_JNI_HELPERS_H_ |
| OLD | NEW |