Changeset 271476 in webkit


Ignore:
Timestamp:
Jan 13, 2021, 5:17:14 PM (5 years ago)
Author:
Andres Gonzalez
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r271473 r271476  
     12021-01-13  Andres Gonzalez  <andresg_22@apple.com>
     2
     3        Crash ASSERT in AccessibilityRenderObject::textUnderElement during AXIsolatedObject initialization.
     4        https://bugs.webkit.org/show_bug.cgi?id=220446
     5
     6        Reviewed by Chris Fleizach.
     7
     8        AXIsolatedObject methods that need to forward the call to the associated
     9        AXObject on the main thread, should call the updateBackingStore method
     10        on the AXObject.
     11        This fixes the issue with AccessibilityRenderObject::textUnderElement
     12        shown in the stack trace.
     13
     14        * accessibility/isolatedtree/AXIsolatedObject.cpp:
     15        (WebCore::AXIsolatedObject::associatedAXObject const):
     16
    1172021-01-13  John Wilander  <wilander@apple.com>
    218
  • trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp

    r271416 r271476  
    3030
    3131#include "AXIsolatedTree.h"
     32#include "AXLogger.h"
    3233
    3334#if PLATFORM(COCOA)
     
    416417    ASSERT(isMainThread());
    417418
    418     auto* axObjectCache = this->axObjectCache();
    419     return axObjectCache && m_id != InvalidAXID ? axObjectCache->objectFromAXID(m_id) : nullptr;
     419    if (m_id == InvalidAXID)
     420        return nullptr;
     421
     422    if (auto* axObjectCache = this->axObjectCache()) {
     423        if (auto* axObject = axObjectCache->objectFromAXID(m_id)) {
     424            axObject->updateBackingStore();
     425            return axObject;
     426        }
     427    }
     428
     429    return nullptr;
    420430}
    421431
Note: See TracChangeset for help on using the changeset viewer.