<AWT Dev> RFR: 8267385: Create NSAccessibilityElement implementation for JavaComponentAccessibility [v2]

Sergey Bylokhov serb at openjdk.java.net
Fri Jul 2 20:58:50 UTC 2021


On Fri, 2 Jul 2021 14:05:40 GMT, Artem Semenov <github.com+36081106+savoptik at openjdk.org> wrote:

>> src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java line 130:
>> 
>>> 128:         if (c != null) {
>>> 129:             try {
>>> 130:                 value = EventQueue.isDispatchThread() ? callable.call() : LWCToolkit.invokeAndWait(callable, c);
>> 
>> When this method is called on EDT?
>
> In the same class there is a getChildrenAndRolesRecursive () method that calls invokeAndWait (), inside it it calls itself and getChildrenAndRoles (), which also call invokeAndWait ().

ok, so this is in the new code, how hard it will be to reimplement these methods to call invokeAndWait only once per callback from the native, as it usually was done before?

>> src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/NavigableTextAccessibility.m line 79:
>> 
>>> 77:     if (values == NULL) {
>>> 78:         // Note: Java will not be on the stack here so a java exception can't happen and no need to call ExceptionCheck.
>>> 79:         NSLog(@"%s failed calling GetDoubleArrayElements", __FUNCTION__);
>> 
>> Please clarify the comment above.
>
> This comment has been carried over from the legacy code. it is still relevant.

The comment states that it is not necessary to call ExceptionCheck, but it will be done before by the CHECK_EXCEPTION. The macro also will log it when necessary.

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

PR: https://git.openjdk.java.net/jdk/pull/4412


More information about the awt-dev mailing list