Bug 236789 - AX: isAXAuthenticatedCallback must be handled on the main runloop
Summary: AX: isAXAuthenticatedCallback must be handled on the main runloop
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tyler Wilcock
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-17 10:23 PST by Tyler Wilcock
Modified: 2022-02-18 08:42 PST (History)
3 users (show)

See Also:


Attachments
Patch (2.15 KB, patch)
2022-02-17 10:26 PST, Tyler Wilcock
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tyler Wilcock 2022-02-17 10:23:07 PST
isAXAuthenticatedCallback in WebProcess Cocoa performs IPC to the UI process to determine if the given auditToken is valid. This causes a crash with isolated tree mode enabled as IPC must be performed on the main thread / runloop. We should dispatch to the main runloop in this function.
Comment 1 Radar WebKit Bug Importer 2022-02-17 10:23:20 PST
<rdar://problem/89094972>
Comment 2 Tyler Wilcock 2022-02-17 10:26:04 PST
Created attachment 452385 [details]
Patch
Comment 3 chris fleizach 2022-02-17 10:50:41 PST
Comment on attachment 452385 [details]
Patch

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

> Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:229
> +        WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebProcessProxy::IsAXAuthenticated(auditToken), Messages::WebProcessProxy::IsAXAuthenticated::Reply(authenticated), 0);

can we cache this? why do we need to keep checking this?
Comment 4 Tyler Wilcock 2022-02-17 11:14:01 PST
(In reply to chris fleizach from comment #3)
> Comment on attachment 452385 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=452385&action=review
> 
> > Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:229
> > +        WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebProcessProxy::IsAXAuthenticated(auditToken), Messages::WebProcessProxy::IsAXAuthenticated::Reply(authenticated), 0);
> 
> can we cache this? why do we need to keep checking this?
It's requested very infrequently, once per AX client that tries to talk to the web process, so I don't think caching would be beneficial.
Comment 5 EWS 2022-02-18 08:42:57 PST
Committed r290128 (247472@main): <https://commits.webkit.org/247472@main>

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