Bug 232999 - Fix for thread deadlocks during layout tests in isolated tree mode.
Summary: Fix for thread deadlocks during layout tests in isolated tree mode.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andres Gonzalez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-11-11 08:39 PST by Andres Gonzalez
Modified: 2021-11-11 14:46 PST (History)
3 users (show)

See Also:


Attachments
Patch (3.78 KB, patch)
2021-11-11 09:05 PST, Andres Gonzalez
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (3.87 KB, patch)
2021-11-11 09:17 PST, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (4.53 KB, patch)
2021-11-11 12:32 PST, 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 2021-11-11 08:39:09 PST
Isolated tree mode: Fix for WTR::AccessibilityUIElement calls into the AX API on the AX thread that must hit the main thread.
Comment 1 Radar WebKit Bug Importer 2021-11-11 08:39:22 PST
<rdar://problem/85300861>
Comment 2 Andres Gonzalez 2021-11-11 09:05:36 PST
Created attachment 443954 [details]
Patch
Comment 3 Andres Gonzalez 2021-11-11 09:17:37 PST
Created attachment 443957 [details]
Patch
Comment 4 chris fleizach 2021-11-11 10:14:48 PST
Comment on attachment 443957 [details]
Patch

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

> Tools/ChangeLog:10
> +        dispatched to a secndary, mocked thread created by the

secondary

> Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:116
> +        spinMainRunLoop();

we'll need to keep spending the run loop while we wait. 
this also means we don't need this semaphore. we could put a bool in AXThread::dispatch that marks complete and then do a 

while ( !complete ) {
  spinMainRunLoop();
}
Comment 5 Andres Gonzalez 2021-11-11 12:32:20 PST
Created attachment 443988 [details]
Patch
Comment 6 Andres Gonzalez 2021-11-11 12:37:41 PST
(In reply to chris fleizach from comment #4)
> Comment on attachment 443957 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=443957&action=review
> 
> > Tools/ChangeLog:10
> > +        dispatched to a secndary, mocked thread created by the
> 
> secondary

Fixed.
> 
> > Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:116
> > +        spinMainRunLoop();
> 
> we'll need to keep spending the run loop while we wait. 
> this also means we don't need this semaphore. we could put a bool in
> AXThread::dispatch that marks complete and then do a 
> 
> while ( !complete ) {
>   spinMainRunLoop();
> }

Thanks! so much simpler and works.
Comment 7 EWS 2021-11-11 14:46:39 PST
Committed r285671 (244158@main): <https://commits.webkit.org/244158@main>

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