< prev index next >

test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref004/followref004.cpp

Print this page
rev 52185 : [mq]: refactor

*** 144,163 **** static void createGlobalRefs(JNIEnv * jni) { jclass klass; ! if ( ! NSK_JNI_VERIFY(jni, (klass = NSK_CPP_STUB2(FindClass, jni, JAVA_LANG_STRING_CLASS_NAME)) != NULL) ) { nsk_jvmti_setFailStatus(); return; } ! if ( ! NSK_JNI_VERIFY(jni, (g_jniGlobalRef = NSK_CPP_STUB2(NewGlobalRef, jni, klass)) != NULL) ) { nsk_jvmti_setFailStatus(); } ! if ( ! NSK_JNI_VERIFY(jni, (g_jniWeakGlobalRef = NSK_CPP_STUB2(NewWeakGlobalRef, jni, klass)) != NULL) ) { nsk_jvmti_setFailStatus(); } } /* createGlobalRefs */ --- 144,163 ---- static void createGlobalRefs(JNIEnv * jni) { jclass klass; ! if ( ! NSK_JNI_VERIFY(jni, (klass = jni->FindClass(JAVA_LANG_STRING_CLASS_NAME)) != NULL) ) { nsk_jvmti_setFailStatus(); return; } ! if ( ! NSK_JNI_VERIFY(jni, (g_jniGlobalRef = jni->NewGlobalRef(klass)) != NULL) ) { nsk_jvmti_setFailStatus(); } ! if ( ! NSK_JNI_VERIFY(jni, (g_jniWeakGlobalRef = jni->NewWeakGlobalRef(klass)) != NULL) ) { nsk_jvmti_setFailStatus(); } } /* createGlobalRefs */
*** 177,189 **** printf(">>> Create JNI global references\n"); fflush(0); createGlobalRefs(jni); ! retCode = NSK_CPP_STUB6(FollowReferences, ! jvmti, ! (jint) 0, /* heap filter */ NULL, /* class */ NULL, /* inital object */ &g_heapCallbacks, (const void *) &g_fakeUserData); --- 177,187 ---- printf(">>> Create JNI global references\n"); fflush(0); createGlobalRefs(jni); ! retCode = jvmti->FollowReferences((jint) 0, /* heap filter */ NULL, /* class */ NULL, /* inital object */ &g_heapCallbacks, (const void *) &g_fakeUserData);
*** 245,255 **** { jvmtiCapabilities caps; memset(&caps, 0, sizeof(caps)); caps.can_tag_objects = 1; ! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { return JNI_ERR; } } if (!NSK_VERIFY(nsk_jvmti_setAgentProc(agentProc, NULL))) { --- 243,253 ---- { jvmtiCapabilities caps; memset(&caps, 0, sizeof(caps)); caps.can_tag_objects = 1; ! if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } if (!NSK_VERIFY(nsk_jvmti_setAgentProc(agentProc, NULL))) {
< prev index next >