equal
deleted
inserted
replaced
99 MutexLocker ml(JNIGlobalHandle_lock); |
99 MutexLocker ml(JNIGlobalHandle_lock); |
100 assert(Universe::heap()->is_in_reserved(obj()), "sanity check"); |
100 assert(Universe::heap()->is_in_reserved(obj()), "sanity check"); |
101 res = _weak_global_handles->allocate_handle(obj()); |
101 res = _weak_global_handles->allocate_handle(obj()); |
102 } |
102 } |
103 // Add weak tag. |
103 // Add weak tag. |
104 assert(is_ptr_aligned(res, weak_tag_alignment), "invariant"); |
104 assert(is_aligned(res, weak_tag_alignment), "invariant"); |
105 char* tptr = reinterpret_cast<char*>(res) + weak_tag_value; |
105 char* tptr = reinterpret_cast<char*>(res) + weak_tag_value; |
106 res = reinterpret_cast<jobject>(tptr); |
106 res = reinterpret_cast<jobject>(tptr); |
107 } else { |
107 } else { |
108 CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops()); |
108 CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops()); |
109 } |
109 } |