Bug 236789

Summary: AX: isAXAuthenticatedCallback must be handled on the main runloop
Product: WebKit Reporter: Tyler Wilcock <tyler_w>
Component: AccessibilityAssignee: Tyler Wilcock <tyler_w>
Status: RESOLVED FIXED    
Severity: Normal CC: andresg_22, cfleizach, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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].