Bug 259832 - AX: Cache the ProcessID in the AXIsolatedTree so that it can be retrieved off the main thread.
Summary: AX: Cache the ProcessID in the AXIsolatedTree so that it can be retrieved off...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Andres Gonzalez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-08-04 12:15 PDT by Andres Gonzalez
Modified: 2023-08-07 13:46 PDT (History)
11 users (show)

See Also:


Attachments
Patch (6.95 KB, patch)
2023-08-04 12:30 PDT, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (6.99 KB, patch)
2023-08-07 08:49 PDT, Andres Gonzalez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].