Crash in AXIsolatedObject destruction.
authorandresg_22@apple.com <andresg_22@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Jan 2020 18:01:14 +0000 (18:01 +0000)
committerandresg_22@apple.com <andresg_22@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Jan 2020 18:01:14 +0000 (18:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=206828

Reviewed by Carlos Alberto Lopez Perez.

Fix for crash on GTK introduced with this IsolatedTree change.

* accessibility/atk/AccessibilityObjectAtk.cpp:
(WebCore::AccessibilityObject::detachPlatformWrapper):

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

Source/WebCore/ChangeLog
Source/WebCore/accessibility/atk/AccessibilityObjectAtk.cpp

index 2f89b42..42c8cd3 100644 (file)
@@ -1,3 +1,15 @@
+2020-01-29  Andres Gonzalez  <andresg_22@apple.com>
+
+        Crash in AXIsolatedObject destruction.
+        https://bugs.webkit.org/show_bug.cgi?id=206828
+
+        Reviewed by Carlos Alberto Lopez Perez.
+
+        Fix for crash on GTK introduced with this IsolatedTree change.
+
+        * accessibility/atk/AccessibilityObjectAtk.cpp:
+        (WebCore::AccessibilityObject::detachPlatformWrapper):
+
 2020-01-29  Peng Liu  <peng.liu6@apple.com>
 
         Always enable some log messages related to audio tracks
index cbc4960..67049cb 100644 (file)
@@ -37,8 +37,14 @@ namespace WebCore {
 
 void AccessibilityObject::detachPlatformWrapper(AccessibilityDetachmentType detachmentType)
 {
-    if (auto* cache = axObjectCache())
-        cache->detachWrapper(this, detachmentType);
+    if (detachmentType != AccessibilityDetachmentType::CacheDestroyed) {
+        if (auto* cache = axObjectCache())
+            cache->detachWrapper(this, detachmentType);
+    }
+
+    auto* wrapper = this->wrapper();
+    ASSERT(wrapper);
+    webkitAccessibleDetach(WEBKIT_ACCESSIBLE(wrapper));
 }
 
 bool AccessibilityObject::accessibilityIgnoreAttachment() const