From 73a0f4355119bfbdc01f8e7dc07ac803454eb20d Mon Sep 17 00:00:00 2001 From: kamg Date: Tue, 20 Oct 2009 16:34:08 -0400 Subject: [PATCH] 6893483: DTrace probe return values for a couple JNI methods are wrong Summary: Fix the shadowing and incorrect macro usages Reviewed-by: coleenp --- src/share/vm/prims/jni.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/share/vm/prims/jni.cpp b/src/share/vm/prims/jni.cpp index 2bba3e0af..20484da07 100644 --- a/src/share/vm/prims/jni.cpp +++ b/src/share/vm/prims/jni.cpp @@ -2116,7 +2116,7 @@ JNI_ENTRY(jobject, jni_GetObjectArrayElement(JNIEnv *env, jobjectArray array, js DT_RETURN_MARK(GetObjectArrayElement, jobject, (const jobject&)ret); objArrayOop a = objArrayOop(JNIHandles::resolve_non_null(array)); if (a->is_within_bounds(index)) { - jobject ret = JNIHandles::make_local(env, a->obj_at(index)); + ret = JNIHandles::make_local(env, a->obj_at(index)); return ret; } else { char buf[jintAsStringSize]; @@ -2150,14 +2150,14 @@ JNI_END #define DEFINE_NEWSCALARARRAY(Return,Allocator,Result) \ \ - DT_RETURN_MARK_DECL_FOR(Result, New##Result##Array, Return);\ + DT_RETURN_MARK_DECL(New##Result##Array, Return);\ \ JNI_ENTRY(Return, \ jni_New##Result##Array(JNIEnv *env, jsize len)) \ JNIWrapper("New" XSTR(Result) "Array"); \ DTRACE_PROBE2(hotspot_jni, New##Result##Array__entry, env, len);\ Return ret = NULL;\ - DT_RETURN_MARK_FOR(Result, New##Result##Array, Return, (const Return&)ret);\ + DT_RETURN_MARK(New##Result##Array, Return, (const Return&)ret);\ \ oop obj= oopFactory::Allocator(len, CHECK_0); \ ret = (Return) JNIHandles::make_local(env, obj); \ -- GitLab