--- a/src/hotspot/share/runtime/jniHandles.cpp Mon Nov 06 12:17:59 2017 +0100
+++ b/src/hotspot/share/runtime/jniHandles.cpp Mon Nov 06 12:53:55 2017 +0100
@@ -127,6 +127,11 @@
template oop JNIHandles::resolve_jweak<true>(jweak);
template oop JNIHandles::resolve_jweak<false>(jweak);
+bool JNIHandles::is_global_weak_cleared(jweak handle) {
+ assert(is_jweak(handle), "not a weak handle");
+ return guard_value<false>(jweak_ref(handle)) == NULL;
+}
+
void JNIHandles::destroy_global(jobject handle) {
if (handle != NULL) {
assert(is_global_handle(handle), "Invalid delete of global JNI handle");