Title: [271843] branches/safari-611-branch/Source/WebCore
Revision
271843
Author
alanc...@apple.com
Date
2021-01-25 14:12:37 -0800 (Mon, 25 Jan 2021)

Log Message

Cherry-pick r271476. rdar://problem/73478439

    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):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271476 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-611-branch/Source/WebCore/ChangeLog (271842 => 271843)


--- branches/safari-611-branch/Source/WebCore/ChangeLog	2021-01-25 22:12:31 UTC (rev 271842)
+++ branches/safari-611-branch/Source/WebCore/ChangeLog	2021-01-25 22:12:37 UTC (rev 271843)
@@ -1,5 +1,42 @@
 2021-01-25  Alan Coon  <alanc...@apple.com>
 
+        Cherry-pick r271476. rdar://problem/73478439
+
+    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):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-01-13  Andres Gonzalez  <andresg...@apple.com>
+
+            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-25  Alan Coon  <alanc...@apple.com>
+
         Cherry-pick r271473. rdar://problem/73478401
 
     PCM: Output logs by default, including to Web Inspector

Modified: branches/safari-611-branch/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp (271842 => 271843)


--- branches/safari-611-branch/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp	2021-01-25 22:12:31 UTC (rev 271842)
+++ branches/safari-611-branch/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp	2021-01-25 22:12:37 UTC (rev 271843)
@@ -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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to