• Home
  • Raw
  • Download

Lines Matching refs:check_jni

104   void ExpectClassNotFound(const char* name, bool check_jni, const char* check_jni_msg,  in ExpectClassNotFound()  argument
107 if (!check_jni || check_jni_msg == nullptr) { in ExpectClassNotFound()
115 void FindClassTest(bool check_jni) { in FindClassTest() argument
116 bool old_check_jni = vm_->SetCheckJniEnabled(check_jni); in FindClassTest()
121 check_jni_abort_catcher.Check(check_jni ? "non-nullable const char* was NULL" in FindClassTest()
132 ExpectClassNotFound("C", check_jni, nullptr, &check_jni_abort_catcher); in FindClassTest()
133 ExpectClassNotFound("V", check_jni, nullptr, &check_jni_abort_catcher); in FindClassTest()
134 ExpectClassNotFound("K", check_jni, nullptr, &check_jni_abort_catcher); in FindClassTest()
136 if (check_jni) { in FindClassTest()
151 ExpectClassNotFound("Ljava.lang.String;", check_jni, "illegal class name 'Ljava.lang.String;'", in FindClassTest()
153 ExpectClassNotFound("[java.lang.String", check_jni, "illegal class name '[java.lang.String'", in FindClassTest()
157 ExpectClassNotFound("Ljava/lang/String;", check_jni, "illegal class name 'Ljava/lang/String;'", in FindClassTest()
161 ExpectClassNotFound("[java/lang/String", check_jni, "illegal class name '[java/lang/String'", in FindClassTest()
164 ExpectClassNotFound("[K", check_jni, "illegal class name '[K'", &check_jni_abort_catcher); in FindClassTest()
167 ExpectClassNotFound("[V", check_jni, "illegal class name '[V'", &check_jni_abort_catcher); in FindClassTest()
169 EXPECT_EQ(check_jni, vm_->SetCheckJniEnabled(old_check_jni)); in FindClassTest()
172 void GetFieldIdBadArgumentTest(bool check_jni) { in GetFieldIdBadArgumentTest() argument
173 bool old_check_jni = vm_->SetCheckJniEnabled(check_jni); in GetFieldIdBadArgumentTest()
181 check_jni_abort_catcher.Check(check_jni ? "GetFieldID received NULL jclass" in GetFieldIdBadArgumentTest()
185 check_jni_abort_catcher.Check(check_jni ? "non-nullable const char* was NULL" in GetFieldIdBadArgumentTest()
189 check_jni_abort_catcher.Check(check_jni ? "non-nullable const char* was NULL" in GetFieldIdBadArgumentTest()
192 EXPECT_EQ(check_jni, vm_->SetCheckJniEnabled(old_check_jni)); in GetFieldIdBadArgumentTest()
195 void GetStaticFieldIdBadArgumentTest(bool check_jni) { in GetStaticFieldIdBadArgumentTest() argument
196 bool old_check_jni = vm_->SetCheckJniEnabled(check_jni); in GetStaticFieldIdBadArgumentTest()
204 check_jni_abort_catcher.Check(check_jni ? "GetStaticFieldID received NULL jclass" in GetStaticFieldIdBadArgumentTest()
208 check_jni_abort_catcher.Check(check_jni ? "non-nullable const char* was NULL" in GetStaticFieldIdBadArgumentTest()
212 check_jni_abort_catcher.Check(check_jni ? "non-nullable const char* was NULL" in GetStaticFieldIdBadArgumentTest()
215 EXPECT_EQ(check_jni, vm_->SetCheckJniEnabled(old_check_jni)); in GetStaticFieldIdBadArgumentTest()
218 void GetMethodIdBadArgumentTest(bool check_jni) { in GetMethodIdBadArgumentTest() argument
219 bool old_check_jni = vm_->SetCheckJniEnabled(check_jni); in GetMethodIdBadArgumentTest()
224 check_jni_abort_catcher.Check(check_jni ? "GetMethodID received NULL jclass" in GetMethodIdBadArgumentTest()
230 check_jni_abort_catcher.Check(check_jni ? "non-nullable const char* was NULL" in GetMethodIdBadArgumentTest()
234 check_jni_abort_catcher.Check(check_jni ? "non-nullable const char* was NULL" in GetMethodIdBadArgumentTest()
237 EXPECT_EQ(check_jni, vm_->SetCheckJniEnabled(old_check_jni)); in GetMethodIdBadArgumentTest()
240 void GetStaticMethodIdBadArgumentTest(bool check_jni) { in GetStaticMethodIdBadArgumentTest() argument
241 bool old_check_jni = vm_->SetCheckJniEnabled(check_jni); in GetStaticMethodIdBadArgumentTest()
246 check_jni_abort_catcher.Check(check_jni ? "GetStaticMethodID received NULL jclass" in GetStaticMethodIdBadArgumentTest()
251 check_jni_abort_catcher.Check(check_jni ? "non-nullable const char* was NULL" in GetStaticMethodIdBadArgumentTest()
255 check_jni_abort_catcher.Check(check_jni ? "non-nullable const char* was NULL" in GetStaticMethodIdBadArgumentTest()
258 EXPECT_EQ(check_jni, vm_->SetCheckJniEnabled(old_check_jni)); in GetStaticMethodIdBadArgumentTest()
261 void GetFromReflectedField_ToReflectedFieldBadArgumentTest(bool check_jni) { in GetFromReflectedField_ToReflectedFieldBadArgumentTest() argument
262 bool old_check_jni = vm_->SetCheckJniEnabled(check_jni); in GetFromReflectedField_ToReflectedFieldBadArgumentTest()
272 if (check_jni) { in GetFromReflectedField_ToReflectedFieldBadArgumentTest()
281 check_jni_abort_catcher.Check(check_jni ? "jfieldID was NULL" in GetFromReflectedField_ToReflectedFieldBadArgumentTest()
286 check_jni_abort_catcher.Check(check_jni ? "expected non-null java.lang.reflect.Field" in GetFromReflectedField_ToReflectedFieldBadArgumentTest()
289 EXPECT_EQ(check_jni, vm_->SetCheckJniEnabled(old_check_jni)); in GetFromReflectedField_ToReflectedFieldBadArgumentTest()
292 void GetFromReflectedMethod_ToReflectedMethodBadArgumentTest(bool check_jni) { in GetFromReflectedMethod_ToReflectedMethodBadArgumentTest() argument
293 bool old_check_jni = vm_->SetCheckJniEnabled(check_jni); in GetFromReflectedMethod_ToReflectedMethodBadArgumentTest()
303 if (check_jni) { in GetFromReflectedMethod_ToReflectedMethodBadArgumentTest()
312 check_jni_abort_catcher.Check(check_jni ? "jmethodID was NULL" in GetFromReflectedMethod_ToReflectedMethodBadArgumentTest()
316 check_jni_abort_catcher.Check(check_jni ? "expected non-null method" : "jlr_method == null"); in GetFromReflectedMethod_ToReflectedMethodBadArgumentTest()
318 EXPECT_EQ(check_jni, vm_->SetCheckJniEnabled(old_check_jni)); in GetFromReflectedMethod_ToReflectedMethodBadArgumentTest()
321 void RegisterAndUnregisterNativesBadArguments(bool check_jni, in RegisterAndUnregisterNativesBadArguments() argument
323 bool old_check_jni = vm_->SetCheckJniEnabled(check_jni); in RegisterAndUnregisterNativesBadArguments()
328 check_jni_abort_catcher->Check(check_jni ? "RegisterNatives received NULL jclass" in RegisterAndUnregisterNativesBadArguments()
339 check_jni_abort_catcher->Check(check_jni ? "UnregisterNatives received NULL jclass" in RegisterAndUnregisterNativesBadArguments()
342 EXPECT_EQ(check_jni, vm_->SetCheckJniEnabled(old_check_jni)); in RegisterAndUnregisterNativesBadArguments()
346 void GetPrimitiveArrayElementsOfWrongType(bool check_jni) { in GetPrimitiveArrayElementsOfWrongType() argument
347 bool old_check_jni = vm_->SetCheckJniEnabled(check_jni); in GetPrimitiveArrayElementsOfWrongType()
354 check_jni ? "incompatible array type boolean[] expected byte[]" in GetPrimitiveArrayElementsOfWrongType()
358 check_jni ? "incompatible array type boolean[] expected short[]" in GetPrimitiveArrayElementsOfWrongType()
362 check_jni ? "incompatible array type boolean[] expected char[]" in GetPrimitiveArrayElementsOfWrongType()
366 check_jni ? "incompatible array type boolean[] expected int[]" in GetPrimitiveArrayElementsOfWrongType()
370 check_jni ? "incompatible array type boolean[] expected long[]" in GetPrimitiveArrayElementsOfWrongType()
374 check_jni ? "incompatible array type boolean[] expected float[]" in GetPrimitiveArrayElementsOfWrongType()
378 check_jni ? "incompatible array type boolean[] expected double[]" in GetPrimitiveArrayElementsOfWrongType()
384 check_jni ? "incompatible array type byte[] expected boolean[]" in GetPrimitiveArrayElementsOfWrongType()
390 check_jni ? "jarray argument has non-array type: java.lang.String" in GetPrimitiveArrayElementsOfWrongType()
393 EXPECT_EQ(check_jni, vm_->SetCheckJniEnabled(old_check_jni)); in GetPrimitiveArrayElementsOfWrongType()
396 void ReleasePrimitiveArrayElementsOfWrongType(bool check_jni) { in ReleasePrimitiveArrayElementsOfWrongType() argument
397 bool old_check_jni = vm_->SetCheckJniEnabled(check_jni); in ReleasePrimitiveArrayElementsOfWrongType()
408 check_jni ? "incompatible array type boolean[] expected byte[]" in ReleasePrimitiveArrayElementsOfWrongType()
413 check_jni ? "incompatible array type boolean[] expected short[]" in ReleasePrimitiveArrayElementsOfWrongType()
418 check_jni ? "incompatible array type boolean[] expected char[]" in ReleasePrimitiveArrayElementsOfWrongType()
423 check_jni ? "incompatible array type boolean[] expected int[]" in ReleasePrimitiveArrayElementsOfWrongType()
428 check_jni ? "incompatible array type boolean[] expected long[]" in ReleasePrimitiveArrayElementsOfWrongType()
433 check_jni ? "incompatible array type boolean[] expected float[]" in ReleasePrimitiveArrayElementsOfWrongType()
438 check_jni ? "incompatible array type boolean[] expected double[]" in ReleasePrimitiveArrayElementsOfWrongType()
452 check_jni ? "incompatible array type byte[] expected boolean[]" in ReleasePrimitiveArrayElementsOfWrongType()
458 check_jni ? "jarray argument has non-array type: java.lang.String" in ReleasePrimitiveArrayElementsOfWrongType()
465 EXPECT_EQ(check_jni, vm_->SetCheckJniEnabled(old_check_jni)); in ReleasePrimitiveArrayElementsOfWrongType()
468 void GetReleasePrimitiveArrayCriticalOfWrongType(bool check_jni) { in GetReleasePrimitiveArrayCriticalOfWrongType() argument
469 bool old_check_jni = vm_->SetCheckJniEnabled(check_jni); in GetReleasePrimitiveArrayCriticalOfWrongType()
475 jni_abort_catcher.Check(check_jni ? "jarray argument has non-array type: java.lang.String" in GetReleasePrimitiveArrayCriticalOfWrongType()
478 jni_abort_catcher.Check(check_jni ? "jarray argument has non-array type: java.lang.String" in GetReleasePrimitiveArrayCriticalOfWrongType()
481 EXPECT_EQ(check_jni, vm_->SetCheckJniEnabled(old_check_jni)); in GetReleasePrimitiveArrayCriticalOfWrongType()
484 void GetPrimitiveArrayRegionElementsOfWrongType(bool check_jni) { in GetPrimitiveArrayRegionElementsOfWrongType() argument
485 bool old_check_jni = vm_->SetCheckJniEnabled(check_jni); in GetPrimitiveArrayRegionElementsOfWrongType()
494 check_jni ? "incompatible array type boolean[] expected byte[]" in GetPrimitiveArrayRegionElementsOfWrongType()
499 check_jni ? "incompatible array type boolean[] expected short[]" in GetPrimitiveArrayRegionElementsOfWrongType()
504 check_jni ? "incompatible array type boolean[] expected char[]" in GetPrimitiveArrayRegionElementsOfWrongType()
509 check_jni ? "incompatible array type boolean[] expected int[]" in GetPrimitiveArrayRegionElementsOfWrongType()
514 check_jni ? "incompatible array type boolean[] expected long[]" in GetPrimitiveArrayRegionElementsOfWrongType()
519 check_jni ? "incompatible array type boolean[] expected float[]" in GetPrimitiveArrayRegionElementsOfWrongType()
524 check_jni ? "incompatible array type boolean[] expected double[]" in GetPrimitiveArrayRegionElementsOfWrongType()
530 check_jni ? "incompatible array type byte[] expected boolean[]" in GetPrimitiveArrayRegionElementsOfWrongType()
535 jni_abort_catcher.Check(check_jni ? "jarray argument has non-array type: java.lang.String" in GetPrimitiveArrayRegionElementsOfWrongType()
539 EXPECT_EQ(check_jni, vm_->SetCheckJniEnabled(old_check_jni)); in GetPrimitiveArrayRegionElementsOfWrongType()
542 void SetPrimitiveArrayRegionElementsOfWrongType(bool check_jni) { in SetPrimitiveArrayRegionElementsOfWrongType() argument
543 bool old_check_jni = vm_->SetCheckJniEnabled(check_jni); in SetPrimitiveArrayRegionElementsOfWrongType()
552 check_jni ? "incompatible array type boolean[] expected byte[]" in SetPrimitiveArrayRegionElementsOfWrongType()
557 check_jni ? "incompatible array type boolean[] expected short[]" in SetPrimitiveArrayRegionElementsOfWrongType()
562 check_jni ? "incompatible array type boolean[] expected char[]" in SetPrimitiveArrayRegionElementsOfWrongType()
567 check_jni ? "incompatible array type boolean[] expected int[]" in SetPrimitiveArrayRegionElementsOfWrongType()
572 check_jni ? "incompatible array type boolean[] expected long[]" in SetPrimitiveArrayRegionElementsOfWrongType()
577 check_jni ? "incompatible array type boolean[] expected float[]" in SetPrimitiveArrayRegionElementsOfWrongType()
582 check_jni ? "incompatible array type boolean[] expected double[]" in SetPrimitiveArrayRegionElementsOfWrongType()
588 check_jni ? "incompatible array type byte[] expected boolean[]" in SetPrimitiveArrayRegionElementsOfWrongType()
593 jni_abort_catcher.Check(check_jni ? "jarray argument has non-array type: java.lang.String" in SetPrimitiveArrayRegionElementsOfWrongType()
596 EXPECT_EQ(check_jni, vm_->SetCheckJniEnabled(old_check_jni)); in SetPrimitiveArrayRegionElementsOfWrongType()
599 void NewObjectArrayBadArguments(bool check_jni) { in NewObjectArrayBadArguments() argument
600 bool old_check_jni = vm_->SetCheckJniEnabled(check_jni); in NewObjectArrayBadArguments()
607 jni_abort_catcher.Check(check_jni ? "negative jsize: -1" : "negative array length: -1"); in NewObjectArrayBadArguments()
610 jni_abort_catcher.Check(check_jni ? "negative jsize: -2147483648" in NewObjectArrayBadArguments()
613 EXPECT_EQ(check_jni, vm_->SetCheckJniEnabled(old_check_jni)); in NewObjectArrayBadArguments()