Lines Matching refs:handle

39   static JNIHandleBlock* _global_handles;             // First global handle block
40 static JNIHandleBlock* _weak_global_handles; // First weak global handle block
44 // Resolve handle into oop
45 inline static oop resolve(jobject handle);
46 // Resolve externally provided handle into oop with some guards
47 inline static oop resolve_external_guard(jobject handle);
48 // Resolve handle into oop, result guaranteed not to be null
49 inline static oop resolve_non_null(jobject handle);
55 inline static void destroy_local(jobject handle);
59 static void destroy_global(jobject handle);
63 static void destroy_weak_global(jobject handle);
84 // the handle. The handle may not be reused before destroy_weak_global is called.
94 static bool is_local_handle(Thread* thread, jobject handle);
96 static bool is_global_handle(jobject handle);
97 static bool is_weak_global_handle(jobject handle);
110 // JNI handle blocks holding local/global JNI handles
118 block_size_in_oops = 32 // Number of handles per handle block
122 int _top; // Index of next unused handle
173 bool chain_contains(jobject handle) const; // Does this block or following blocks contain handle
174 bool contains(jobject handle) const; // Does this block contain handle
178 static bool any_contains(jobject handle); // Does any block currently in use contain handle
184 inline oop JNIHandles::resolve(jobject handle) {
185 oop result = (handle == NULL ? (oop)NULL : *(oop*)handle);
186 assert(result != NULL || (handle == NULL || !CheckJNICalls || is_weak_global_handle(handle)), "Invalid value read from jni handle");
187 assert(result != badJNIHandle, "Pointing to zapped jni handle area");
192 inline oop JNIHandles::resolve_external_guard(jobject handle) {
193 if (handle == NULL) return NULL;
194 oop result = *(oop*)handle;
200 inline oop JNIHandles::resolve_non_null(jobject handle) {
201 assert(handle != NULL, "JNI handle should not be null");
202 oop result = *(oop*)handle;
203 assert(result != NULL, "Invalid value read from jni handle");
204 assert(result != badJNIHandle, "Pointing to zapped jni handle area");
206 assert(result != deleted_handle(), "Used a deleted global handle.");
224 inline void JNIHandles::destroy_local(jobject handle) {
225 if (handle != NULL) {
226 *((oop*)handle) = deleted_handle(); // Mark the handle as deleted, allocate will reuse it