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

See Also:

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)
    if (recursive) {
        for (auto& child : object->children())
            add(stream, child, true);

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
Comment 2 Tyler Wilcock 2022-01-27 07:58:34 PST
Created attachment 450137 [details]
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].