[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: RFR: 8298644 JNI call of getCurrentComponent on a wrong thread [v4]
From:       Sergey Bylokhov <serb () openjdk ! org>
Date:       2022-12-29 20:56:51
Message-ID: XoDoq-4eSMowk20xUz1W8tUDmEwi1oV02WbS_WKROAo=.449ad8d9-b852-49f7-a9a8-a4236e5d1210 () github ! com
[Download RAW message or body]

On Thu, 29 Dec 2022 14:23:40 GMT, Artem Semenov <asemenov@openjdk.org> wrote:

> > [OutlineRowAccessibility currentAccessibleWithENV:] defines the \
> > getCurrentComponent method on the AccessibleContext instance of \
> > AccessibleJTreeNode class, however the call should go through CAccessibility so \
> > that it is executed on the Event Dispatch thread.
> 
> Artem Semenov has updated the pull request with a new target base due to a merge or \
> a rebase. The pull request now contains four commits: 
> - Merge master
> - update accessor
> - Please split the long lines to have 80 chars per line.
> - 8298644 JNI call of getCurrentComponent on a wrong thread

src/java.desktop/share/classes/sun/swing/SwingAccessor.java line 60:

> 58: 
> 59:     public static AccessibleComponentAccessor getAccessibleComponentAccessor() \
>                 {
> 60:         return accessibleComponentAccessor;

It is better to force the "ensureClassInitialized" as any other getters in this \
class. To make sure the field is up-to-date even if it was initialized on another \
thread.

src/java.desktop/share/classes/sun/swing/SwingAccessor.java line 71:

> 69:      * For example, the renderer of a list element, a table cell, or a tree \
>                 node
> 70:      */
> 71:     public interface AccessibleComponentAccessor {

Note that this class declares interfaces at the top, and then field/get/set at the \
bottom of the file.

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

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic