Bug 256625 - AX: Make AXGeometryManager thread safe.
Summary: AX: Make AXGeometryManager thread safe.
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-05-10 19:33 PDT by Andres Gonzalez
Modified: 2023-05-11 08:52 PDT (History)
11 users (show)

See Also:


Attachments
Patch (10.54 KB, patch)
2023-05-10 19:52 PDT, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (10.77 KB, patch)
2023-05-11 07:30 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-05-10 19:33:43 PDT
Since this class is now used off the main thread, needs to be  thread safe.
Comment 1 Andres Gonzalez 2023-05-10 19:52:34 PDT
Created attachment 466311 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2023-05-10 19:52:45 PDT
<rdar://problem/109185522>
Comment 3 Tyler Wilcock 2023-05-10 20:52:27 PDT
Comment on attachment 466311 [details]
Patch

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

> Source/WebCore/accessibility/AXGeometryManager.cpp:54
> +    m_updateObjectRegionsTimer.stop();

It is cheaper to check !m_updateObjectRegionsTimer.isActive() before stop() rather than unconditionally calling stop() (by a surprising amount if you dig into the implementation -- I did for a previous change). Might not matter too much though.

> Source/WebCore/accessibility/AXGeometryManager.h:76
> +    Lock m_lock;

Is there a more descriptive name than m_lock? m_screenRectLock?
Comment 4 Andres Gonzalez 2023-05-11 07:30:03 PDT
Created attachment 466318 [details]
Patch
Comment 5 EWS 2023-05-11 08:51:57 PDT
Committed 263970@main (7a6e0627e073): <https://commits.webkit.org/263970@main>

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