Title: [269833] trunk/Source/WebCore
Revision
269833
Author
[email protected]
Date
2020-11-15 13:03:32 -0800 (Sun, 15 Nov 2020)

Log Message

Fix for infinite recursion crash in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=218961

Reviewed by Chris Fleizach.

Covered by existing tests.

[WebAccessibilityObjectWrapper attachmentView] can cause the
initialization of a new AXIsolatedObject which in turn can invoke
indirectly AccessibilityObject::accessibilityIgnoreAttachment, thus
creating an infinite recursion. This change avoids this problem and
makes this method more efficient even in those cases where there was no
infinite recursion.

* accessibility/mac/AccessibilityObjectMac.mm:
(WebCore::AccessibilityObject::accessibilityIgnoreAttachment const):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (269832 => 269833)


--- trunk/Source/WebCore/ChangeLog	2020-11-15 19:58:07 UTC (rev 269832)
+++ trunk/Source/WebCore/ChangeLog	2020-11-15 21:03:32 UTC (rev 269833)
@@ -1,3 +1,22 @@
+2020-11-15  Andres Gonzalez  <[email protected]>
+
+        Fix for infinite recursion crash in isolated tree mode.
+        https://bugs.webkit.org/show_bug.cgi?id=218961
+
+        Reviewed by Chris Fleizach.
+
+        Covered by existing tests.
+
+        [WebAccessibilityObjectWrapper attachmentView] can cause the
+        initialization of a new AXIsolatedObject which in turn can invoke
+        indirectly AccessibilityObject::accessibilityIgnoreAttachment, thus
+        creating an infinite recursion. This change avoids this problem and
+        makes this method more efficient even in those cases where there was no
+        infinite recursion.
+
+        * accessibility/mac/AccessibilityObjectMac.mm:
+        (WebCore::AccessibilityObject::accessibilityIgnoreAttachment const):
+
 2020-11-15  Youenn Fablet  <[email protected]>
 
         Add a WebRTC SFrame transform

Modified: trunk/Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm (269832 => 269833)


--- trunk/Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm	2020-11-15 19:58:07 UTC (rev 269832)
+++ trunk/Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm	2020-11-15 21:03:32 UTC (rev 269833)
@@ -105,8 +105,9 @@
         return true;
 
     ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-    if ([wrapper() attachmentView])
-        return [[wrapper() attachmentView] accessibilityIsIgnored];
+    id attachmentView = widget ? NSAccessibilityUnignoredDescendant(widget->platformWidget()) : nil;
+    if (attachmentView)
+        return [attachmentView accessibilityIsIgnored];
     ALLOW_DEPRECATED_DECLARATIONS_END
 
     // Attachments are ignored by default (unless we determine that we should expose them).
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to