Title: [261653] trunk/Source/WebCore
Revision
261653
Author
andresg...@apple.com
Date
2020-05-13 13:51:52 -0700 (Wed, 13 May 2020)

Log Message

Remove unnecessary assert in {WebAccessibilityObjectWrapper attachmentView].
https://bugs.webkit.org/show_bug.cgi?id=211857

Reviewed by Chris Fleizach.

This assert is unnecessary since the backing object that is relevant is
the one on the main thread. This was causing crashes in LayoutTest in
isolated tree mode.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper attachmentView]):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (261652 => 261653)


--- trunk/Source/WebCore/ChangeLog	2020-05-13 20:51:18 UTC (rev 261652)
+++ trunk/Source/WebCore/ChangeLog	2020-05-13 20:51:52 UTC (rev 261653)
@@ -1,3 +1,17 @@
+2020-05-13  Andres Gonzalez  <andresg...@apple.com>
+
+        Remove unnecessary assert in {WebAccessibilityObjectWrapper attachmentView].
+        https://bugs.webkit.org/show_bug.cgi?id=211857
+
+        Reviewed by Chris Fleizach.
+
+        This assert is unnecessary since the backing object that is relevant is
+        the one on the main thread. This was causing crashes in LayoutTest in
+        isolated tree mode.
+
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (-[WebAccessibilityObjectWrapper attachmentView]):
+
 2020-05-13  Jer Noble  <jer.no...@apple.com>
 
         Replace isNullFunctionPointer with real weak-linking support

Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (261652 => 261653)


--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm	2020-05-13 20:51:18 UTC (rev 261652)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm	2020-05-13 20:51:52 UTC (rev 261653)
@@ -556,13 +556,13 @@
 
 - (id)attachmentView
 {
-    ASSERT(self.axBackingObject->isAttachment());
-
     return Accessibility::retrieveAutoreleasedValueFromMainThread<id>([protectedSelf = retainPtr(self)] () -> RetainPtr<id> {
-        auto* widget = protectedSelf.get().axBackingObject->widgetForAttachmentView();
-        if (!widget)
+        auto* backingObject = protectedSelf.get().axBackingObject;
+        if (!backingObject)
             return nil;
-        return NSAccessibilityUnignoredDescendant(widget->platformWidget());
+
+        auto* widget = backingObject->widgetForAttachmentView();
+        return widget ? NSAccessibilityUnignoredDescendant(widget->platformWidget()) : nil;
     });
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to