Bug 259832

Summary: AX: Cache the ProcessID in the AXIsolatedTree so that it can be retrieved off the main thread.
Product: WebKit Reporter: Andres Gonzalez <andresg_22>
Component: AccessibilityAssignee: Andres Gonzalez <andresg_22>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, andresg_22, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, tyler_w, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch none

Description Andres Gonzalez 2023-08-04 12:15:12 PDT
.
Comment 1 Radar WebKit Bug Importer 2023-08-04 12:15:39 PDT
<rdar://problem/113407757>
Comment 2 Andres Gonzalez 2023-08-04 12:30:20 PDT
Created attachment 467198 [details]
Patch
Comment 3 Tyler Wilcock 2023-08-04 12:36:02 PDT
Do we need to update this new property when RuntimeApplicationChecks::setPresentingApplicationPID is called?
Comment 4 Andres Gonzalez 2023-08-07 08:49:44 PDT
Created attachment 467212 [details]
Patch
Comment 5 Andres Gonzalez 2023-08-07 08:57:15 PDT
(In reply to Tyler Wilcock from comment #3)
> Do we need to update this new property when
> RuntimeApplicationChecks::setPresentingApplicationPID is called?

setPresentingApplicationPID is called only during the web process initialization which is too early to update AX. In the second revision, the ProcessID is cached in the AXIsolatedTree instead of in the individual objects, which makes more sense since this is a global property. If in the future we have changing ProcessID, we will need to update this member in the AXIsolatedTree class if it already exists at that point.
Comment 6 Tyler Wilcock 2023-08-07 10:04:16 PDT
Comment on attachment 467212 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=467212&action=review

> Source/WebCore/accessibility/AccessibilityObject.h:76
> +    ProcessID processID() const override;

Not necessary to spin a new patch, but seems like this could be `final` instead of `override`.

> Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:54
> +    ProcessID processID() const override { return tree()->processID(); }

Not necessary to spin a new patch, but seems like this could be `final` instead of `override`.
Comment 7 EWS 2023-08-07 13:46:25 PDT
Committed 266654@main (68677a255c20): <https://commits.webkit.org/266654@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 467212 [details].