< prev index next >

src/hotspot/share/prims/jniCheck.cpp

Print this page




 809     functionEnter(thr);
 810     IN_VM(
 811       if (ref != NULL) {
 812         jniCheck::validate_handle(thr, ref);
 813       }
 814     )
 815     jobject result = UNCHECKED()->NewLocalRef(env, ref);
 816     functionExit(thr);
 817     return result;
 818 JNI_END
 819 
 820 JNI_ENTRY_CHECKED(jint,
 821   checked_jni_EnsureLocalCapacity(JNIEnv *env,
 822                                   jint capacity))
 823     functionEnter(thr);
 824     if (capacity < 0) {
 825       NativeReportJNIFatalError(thr, "negative capacity");
 826     }
 827     jint result = UNCHECKED()->EnsureLocalCapacity(env, capacity);
 828     if (result == JNI_OK) {


 829       add_planned_handle_capacity(thr->active_handles(), capacity);

 830     }
 831     functionExit(thr);
 832     return result;
 833 JNI_END
 834 
 835 JNI_ENTRY_CHECKED(jobject,
 836   checked_jni_AllocObject(JNIEnv *env,
 837                           jclass clazz))
 838     functionEnter(thr);
 839     IN_VM(
 840       jniCheck::validate_class(thr, clazz, false);
 841     )
 842     jobject result = UNCHECKED()->AllocObject(env,clazz);
 843     functionExit(thr);
 844     return result;
 845 JNI_END
 846 
 847 JNI_ENTRY_CHECKED(jobject,
 848   checked_jni_NewObject(JNIEnv *env,
 849                         jclass clazz,




 809     functionEnter(thr);
 810     IN_VM(
 811       if (ref != NULL) {
 812         jniCheck::validate_handle(thr, ref);
 813       }
 814     )
 815     jobject result = UNCHECKED()->NewLocalRef(env, ref);
 816     functionExit(thr);
 817     return result;
 818 JNI_END
 819 
 820 JNI_ENTRY_CHECKED(jint,
 821   checked_jni_EnsureLocalCapacity(JNIEnv *env,
 822                                   jint capacity))
 823     functionEnter(thr);
 824     if (capacity < 0) {
 825       NativeReportJNIFatalError(thr, "negative capacity");
 826     }
 827     jint result = UNCHECKED()->EnsureLocalCapacity(env, capacity);
 828     if (result == JNI_OK) {
 829       // increase local ref capacity if needed
 830       if ((size_t)capacity > thr->active_handles()->get_planned_capacity()) {
 831         add_planned_handle_capacity(thr->active_handles(), capacity);
 832       }
 833     }
 834     functionExit(thr);
 835     return result;
 836 JNI_END
 837 
 838 JNI_ENTRY_CHECKED(jobject,
 839   checked_jni_AllocObject(JNIEnv *env,
 840                           jclass clazz))
 841     functionEnter(thr);
 842     IN_VM(
 843       jniCheck::validate_class(thr, clazz, false);
 844     )
 845     jobject result = UNCHECKED()->AllocObject(env,clazz);
 846     functionExit(thr);
 847     return result;
 848 JNI_END
 849 
 850 JNI_ENTRY_CHECKED(jobject,
 851   checked_jni_NewObject(JNIEnv *env,
 852                         jclass clazz,


< prev index next >