Title: [271476] trunk/Source/WebCore
Revision
271476
Author
[email protected]
Date
2021-01-13 17:17:14 -0800 (Wed, 13 Jan 2021)

Log Message

Crash ASSERT in AccessibilityRenderObject::textUnderElement during AXIsolatedObject initialization.
https://bugs.webkit.org/show_bug.cgi?id=220446

Reviewed by Chris Fleizach.

AXIsolatedObject methods that need to forward the call to the associated
AXObject on the main thread, should call the updateBackingStore method
on the AXObject.
This fixes the issue with AccessibilityRenderObject::textUnderElement
shown in the stack trace.

* accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::associatedAXObject const):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (271475 => 271476)


--- trunk/Source/WebCore/ChangeLog	2021-01-14 00:48:26 UTC (rev 271475)
+++ trunk/Source/WebCore/ChangeLog	2021-01-14 01:17:14 UTC (rev 271476)
@@ -1,3 +1,19 @@
+2021-01-13  Andres Gonzalez  <[email protected]>
+
+        Crash ASSERT in AccessibilityRenderObject::textUnderElement during AXIsolatedObject initialization.
+        https://bugs.webkit.org/show_bug.cgi?id=220446
+
+        Reviewed by Chris Fleizach.
+
+        AXIsolatedObject methods that need to forward the call to the associated
+        AXObject on the main thread, should call the updateBackingStore method
+        on the AXObject.
+        This fixes the issue with AccessibilityRenderObject::textUnderElement
+        shown in the stack trace.
+
+        * accessibility/isolatedtree/AXIsolatedObject.cpp:
+        (WebCore::AXIsolatedObject::associatedAXObject const):
+
 2021-01-13  John Wilander  <[email protected]>
 
         PCM: Output logs by default, including to Web Inspector

Modified: trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp (271475 => 271476)


--- trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp	2021-01-14 00:48:26 UTC (rev 271475)
+++ trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp	2021-01-14 01:17:14 UTC (rev 271476)
@@ -29,6 +29,7 @@
 #include "AXIsolatedObject.h"
 
 #include "AXIsolatedTree.h"
+#include "AXLogger.h"
 
 #if PLATFORM(COCOA)
 #include <pal/spi/cocoa/AccessibilitySupportSoftLink.h>
@@ -415,8 +416,17 @@
 {
     ASSERT(isMainThread());
 
-    auto* axObjectCache = this->axObjectCache();
-    return axObjectCache && m_id != InvalidAXID ? axObjectCache->objectFromAXID(m_id) : nullptr;
+    if (m_id == InvalidAXID)
+        return nullptr;
+
+    if (auto* axObjectCache = this->axObjectCache()) {
+        if (auto* axObject = axObjectCache->objectFromAXID(m_id)) {
+            axObject->updateBackingStore();
+            return axObject;
+        }
+    }
+
+    return nullptr;
 }
 
 void AXIsolatedObject::setMathscripts(AXPropertyName propertyName, AXCoreObject& object)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to