Bug 235715 - AXLogger::add should not cause tree updates via children()
Summary: AXLogger::add should not cause tree updates via children()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Tyler Wilcock
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-01-27 07:54 PST by Tyler Wilcock
Modified: 2022-01-27 11:56 PST (History)
10 users (show)

See Also:


Attachments
Patch (1.63 KB, patch)
2022-01-27 07:58 PST, Tyler Wilcock
ews-feeder: commit-queue-
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-01-27 07:54:43 PST
AXLogger::add(TextStream&, const RefPtr<AXCoreObject>&, bool) currently calls the update version of children, causing behavior to potentially be different between builds with logging enabled and logging disabled.

void AXLogger::add(TextStream& stream, const RefPtr<AXCoreObject>& object, bool recursive)
{
    ...truncated...
    if (recursive) {
        for (auto& child : object->children())
            add(stream, child, true);
    }
    ...truncated
}

The logger should only read the current state of the object / tree, never modify it.
Comment 1 Radar WebKit Bug Importer 2022-01-27 07:55:13 PST
<rdar://problem/88132984>
Comment 2 Tyler Wilcock 2022-01-27 07:58:34 PST
Created attachment 450137 [details]
Patch
Comment 3 EWS 2022-01-27 10:00:04 PST
Committed r288676 (246482@main): <https://commits.webkit.org/246482@main>

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