RFR: 8299412 JNI call of getAccessibleActionCount on a wrong thread [v2]

Phil Race prr at openjdk.org
Thu Jan 5 20:49:54 UTC 2023


On Fri, 30 Dec 2022 06:53:56 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> Artem Semenov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   There's a more compact way of doing this:
>
> src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/CommonComponentAccessibility.m line 605:
> 
>> 603:         DECLARE_STATIC_METHOD(jm_getAccessibleActionCount, sjc_CAccessibility, "getAccessibleActionCount", "(Ljavax/accessibility/AccessibleAction;Ljava/awt/Component;)I");
>> 604:         jint count = (*env)->CallStaticIntMethod(env, sjc_CAccessibility, jm_getAccessibleActionCount, axAction, fComponent);
>> 605:         CHECK_EXCEPTION();
> 
> Do we need to call "(*env)->DeleteLocalRef(env, axAction);" in case of error in CHECK_EXCEPTION?

I think we still reach the DeleteLocalRef that's further down at line 624

-------------

PR: https://git.openjdk.org/jdk/pull/11803



More information about the client-libs-dev mailing list