Change 512 to kLocalsMax.
Clean up after cherry pick.
Change-Id: I39308ed1497a94b2a47bba8806e494d066d5f6fc
diff --git a/runtime/jni_internal_test.cc b/runtime/jni_internal_test.cc
index e5923de..c24ef05 100644
--- a/runtime/jni_internal_test.cc
+++ b/runtime/jni_internal_test.cc
@@ -799,7 +799,7 @@
ASSERT_NE(fid, nullptr);
// Turn the fid into a java.lang.reflect.Field...
jobject field = env_->ToReflectedField(c, fid, JNI_FALSE);
- for (size_t i = 0; i <= 512; ++i) {
+ for (size_t i = 0; i <= kLocalsMax; ++i) {
// Regression test for b/18396311, ToReflectedField leaking local refs causing a local
// reference table overflows with 512 references to ArtField
env_->DeleteLocalRef(env_->ToReflectedField(c, fid, JNI_FALSE));
@@ -830,7 +830,7 @@
ASSERT_NE(mid, nullptr);
// Turn the mid into a java.lang.reflect.Constructor...
jobject method = env_->ToReflectedMethod(c, mid, JNI_FALSE);
- for (size_t i = 0; i <= 512; ++i) {
+ for (size_t i = 0; i <= kLocalsMax; ++i) {
// Regression test for b/18396311, ToReflectedMethod leaking local refs causing a local
// reference table overflows with 512 references to ArtMethod
env_->DeleteLocalRef(env_->ToReflectedMethod(c, mid, JNI_FALSE));