Index: chrome/browser/android/chrome_backup_agent.cc |
diff --git a/chrome/browser/android/chrome_backup_agent.cc b/chrome/browser/android/chrome_backup_agent.cc |
index 965f53c8b506cbef0bb0e733a910ff4dec4b4615..7ce2ac6500faa92a887a8368f4c693af11676ca4 100644 |
--- a/chrome/browser/android/chrome_backup_agent.cc |
+++ b/chrome/browser/android/chrome_backup_agent.cc |
@@ -74,7 +74,8 @@ static void SetBoolBackupPrefs( |
const base::android::JavaParamRef<jbooleanArray>& values) { |
std::vector<std::string> pref_names; |
base::android::AppendJavaStringArrayToStringVector(env, names, &pref_names); |
- jboolean* pref_values = env->GetBooleanArrayElements(values, nullptr); |
+ std::vector<bool> pref_values; |
+ JavaBooleanArrayToBoolVector(env, values, &pref_values); |
std::unordered_set<std::string> valid_prefs( |
std::begin(backed_up_preferences_), std::end(backed_up_preferences_)); |