Make JNI array helpers take JavaRef parameters.
Instead of passing bare jarray pointers into the JNI array helper
functions, pass in JavaRefs to avoid the caller having to use .obj()
everywhere.
[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
Bug: 519562
Test: base_unittests
Change-Id: Ib01509aa73ada6adb2605011a8160b53cf957895
Reviewed-on: https://chromium-review.googlesource.com/c/1255702
Reviewed-by: Richard Coles <[email protected]>
Reviewed-by: Yaron Friedman <[email protected]>
Commit-Queue: Richard Coles <[email protected]>
Cr-Commit-Position: refs/heads/master@{#599305}
diff --git a/chrome/browser/android/chrome_backup_agent_unittest.cc b/chrome/browser/android/chrome_backup_agent_unittest.cc
index 8c46de5..91ff2a7 100644
--- a/chrome/browser/android/chrome_backup_agent_unittest.cc
+++ b/chrome/browser/android/chrome_backup_agent_unittest.cc
@@ -59,7 +59,7 @@
ScopedJavaLocalRef<jobjectArray> result =
GetBoolBackupNamesForTesting(env_, JavaParamRef<jobject>(nullptr));
std::vector<std::string> pref_names;
- AppendJavaStringArrayToStringVector(AttachCurrentThread(), result.obj(),
+ AppendJavaStringArrayToStringVector(AttachCurrentThread(), result,
&pref_names);
EXPECT_EQ(expected_pref_names_, pref_names);
}