Title: [288676] trunk/Source/WebCore
Revision
288676
Author
tyle...@apple.com
Date
2022-01-27 09:58:50 -0800 (Thu, 27 Jan 2022)

Log Message

AXLogger::add should not cause tree updates via children()
https://bugs.webkit.org/show_bug.cgi?id=235715

Reviewed by Chris Fleizach.

AXLogger::add(TextStream&, const RefPtr<AXCoreObject>&, bool) currently
calls the update version of AXCoreObject::children(bool), causing behavior
to potentially be different between builds with logging enabled and logging
disabled.

The logger should only read the current state of the object / tree, never modify it.

* accessibility/AXLogger.cpp:
(WebCore::AXLogger::add):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (288675 => 288676)


--- trunk/Source/WebCore/ChangeLog	2022-01-27 17:49:09 UTC (rev 288675)
+++ trunk/Source/WebCore/ChangeLog	2022-01-27 17:58:50 UTC (rev 288676)
@@ -1,3 +1,20 @@
+2022-01-27  Tyler Wilcock  <tyle...@apple.com>
+
+        AXLogger::add should not cause tree updates via children()
+        https://bugs.webkit.org/show_bug.cgi?id=235715
+
+        Reviewed by Chris Fleizach.
+
+        AXLogger::add(TextStream&, const RefPtr<AXCoreObject>&, bool) currently
+        calls the update version of AXCoreObject::children(bool), causing behavior
+        to potentially be different between builds with logging enabled and logging
+        disabled.
+
+        The logger should only read the current state of the object / tree, never modify it.
+
+        * accessibility/AXLogger.cpp:
+        (WebCore::AXLogger::add):
+
 2022-01-27  Antti Koivisto  <an...@apple.com>
 
         [CSS Container Queries] Basic parsing support for query syntax

Modified: trunk/Source/WebCore/accessibility/AXLogger.cpp (288675 => 288676)


--- trunk/Source/WebCore/accessibility/AXLogger.cpp	2022-01-27 17:49:09 UTC (rev 288675)
+++ trunk/Source/WebCore/accessibility/AXLogger.cpp	2022-01-27 17:58:50 UTC (rev 288676)
@@ -100,7 +100,7 @@
     stream << *object;
 
     if (recursive) {
-        for (auto& child : object->children())
+        for (auto& child : object->children(false))
             add(stream, child, true);
     }
     stream.decreaseIndent();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to