From aa3838e1475ca48377fc40c39f7fe64c50e69d0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Zezula?= Date: Sun, 18 Aug 2024 19:16:04 +0200 Subject: [PATCH] Updated comment in getObjectValue. Co-authored-by: Douglas Simon --- src/hotspot/share/jvmci/jvmciCompilerToVM.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp index 5f1de1c9221ef..d231fbe8a6a0e 100644 --- a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp +++ b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp @@ -710,7 +710,8 @@ C2V_END C2V_VMENTRY_0(jlong, getJObjectValue, (JNIEnv* env, jobject, jobject constant_jobject)) requireNotInHotSpot("getJObjectValue", JVMCI_CHECK_0); - // Ensure that we are not using the top-most JNIHandleBlock, which is never released. + // Ensure that current JNI handle scope is not the top-most JNIHandleBlock as handles + // in that scope are only released when the thread exits. if (!THREAD->has_last_Java_frame() && THREAD->active_handles()->pop_frame_link() == nullptr) { JVMCI_THROW_MSG_0(IllegalStateException, err_msg("Cannot call getJObjectValue without Java frame anchor or a pushed JNI handle block")); }