Support for JNI local reference cookie.
This also fixes a cross compilation bug in reseting the top of the
indirect reference table following a down call.
Change-Id: I40d913a6f86dadfe87b58d6d13a1ff3613f270ac
diff --git a/src/jni_compiler_test.cc b/src/jni_compiler_test.cc
index c2949c9..ecc2f88 100644
--- a/src/jni_compiler_test.cc
+++ b/src/jni_compiler_test.cc
@@ -516,7 +516,7 @@
jint local_ref_test(JNIEnv* env, jobject thisObj, jint x) {
// Add 10 local references
- for(int i = 0; i < 10; i++) {
+ for (int i = 0; i < 10; i++) {
AddLocalReference<jobject>(env, Decode<Object*>(env, thisObj));
}
return x+1;
@@ -525,7 +525,7 @@
TEST_F(JniCompilerTest, LocalReferenceTableClearingTest) {
SetupForTest(false, "fooI", "(I)I", reinterpret_cast<void*>(&local_ref_test));
// 1000 invocations of a method that adds 10 local references
- for(int i=0; i < 1000; i++) {
+ for (int i=0; i < 1000; i++) {
jint result = env_->CallIntMethod(jobj_, jmethod_, i);
EXPECT_TRUE(result == i + 1);
}