Chromium Code Reviews| Index: base/android/jni_array.cc |
| diff --git a/base/android/jni_array.cc b/base/android/jni_array.cc |
| index 1bbc66997bdea1f9b7e52022287b08b90c3fec57..8df2e24decbf5a2eecb5884764ed2badbc6477e0 100644 |
| --- a/base/android/jni_array.cc |
| +++ b/base/android/jni_array.cc |
| @@ -185,6 +185,17 @@ void JavaIntArrayToIntVector(JNIEnv* env, |
| env->GetIntArrayRegion(int_array, 0, len, &(*out)[0]); |
| } |
| +void JavaLongArrayToInt64Vector(JNIEnv* env, |
| + jlongArray long_array, |
| + std::vector<int64>* out) { |
| + DCHECK(out); |
| + size_t len = SafeGetArrayLength(env, long_array); |
| + out->resize(len); |
| + if (!len) |
| + return; |
| + env->GetLongArrayRegion(long_array, 0, len, &(*out)[0]); |
|
DmitrySkiba
2015/08/25 14:31:44
Hmm, this should produce a warning because GetLong
fgorski
2015/08/25 18:37:55
Good point, I am testing the updated version now.
|
| +} |
| + |
| void JavaLongArrayToLongVector(JNIEnv* env, |
| jlongArray long_array, |
| std::vector<jlong>* out) { |