Bug 251577 - AX: Object IDs should not be generated with AXTreeStore::generateNewID().
Summary: AX: Object IDs should not be generated with AXTreeStore::generateNewID().
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-02-02 04:36 PST by Andres Gonzalez
Modified: 2023-02-06 15:54 PST (History)
11 users (show)

See Also:


Attachments
Patch (3.03 KB, patch)
2023-02-02 04:49 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 2023-02-02 04:36:39 PST
Fallout from fix for https://bugs.webkit.org/show_bug.cgi?id=249480.
Comment 1 Radar WebKit Bug Importer 2023-02-02 04:36:54 PST
<rdar://problem/104956200>
Comment 2 Andres Gonzalez 2023-02-02 04:49:17 PST
Created attachment 464813 [details]
Patch
Comment 3 Tyler Wilcock 2023-02-02 09:07:39 PST
Comment on attachment 464813 [details]
Patch

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

I'm surprised that this bug didn't cause any tests to fail. Is it testable in any way?

> Source/WebCore/accessibility/AXObjectCache.h:239
> +    AccessibilityObject* objectForID(const AXID id) const { return m_objects.get(id); }

Why not use a reference here?
Comment 4 Andres Gonzalez 2023-02-02 09:28:34 PST
(In reply to Tyler Wilcock from comment #3)
> Comment on attachment 464813 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=464813&action=review
> 
> I'm surprised that this bug didn't cause any tests to fail. Is it testable
> in any way?

This is going away with the TextMarker reword, so I don't think it is worthy creating a test at this point.
> 
> > Source/WebCore/accessibility/AXObjectCache.h:239
> > +    AccessibilityObject* objectForID(const AXID id) const { return m_objects.get(id); }
> 
> Why not use a reference here?

because it can be null, i.e., the tree can be requested for an AXID that is no longer there.
Comment 5 EWS 2023-02-06 15:54:38 PST
Committed 259922@main (c11d33bb0bb2): <https://commits.webkit.org/259922@main>

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