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

Sergey Bylokhov serb at openjdk.org
Fri Dec 30 06:56:48 UTC 2022


On Thu, 29 Dec 2022 20:41:04 GMT, Artem Semenov <asemenov at openjdk.org> wrote:

>> [CommonComponentAccessibility getActionsWithEnv:] defines the getAccessibleActionCount method on the AccessibleAction class, however the call should go through CAccessibility so that it is executed on the Event Dispatch thread.
>> 
>> @azuev-java @mrserb @prrace please review
>
> 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?

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

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



More information about the client-libs-dev mailing list