Title: [291855] trunk/Source/WebCore
Revision
291855
Author
[email protected]
Date
2022-03-25 09:07:54 -0700 (Fri, 25 Mar 2022)

Log Message

Include object IDs in logs and assert in AXIsolatedTree and WebAccessibilityObjectWrapperBase
https://bugs.webkit.org/show_bug.cgi?id=238352

Reviewed by Chris Fleizach.

I've found this additional information to be useful in other branches I'm working on.

* accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::removeSubtreeFromNodeMap):
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(-[WebAccessibilityObjectWrapperBase detachIsolatedObject:]):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (291854 => 291855)


--- trunk/Source/WebCore/ChangeLog	2022-03-25 15:55:40 UTC (rev 291854)
+++ trunk/Source/WebCore/ChangeLog	2022-03-25 16:07:54 UTC (rev 291855)
@@ -1,3 +1,17 @@
+2022-03-25  Tyler Wilcock  <[email protected]>
+
+        Include object IDs in logs and assert in AXIsolatedTree and WebAccessibilityObjectWrapperBase
+        https://bugs.webkit.org/show_bug.cgi?id=238352
+
+        Reviewed by Chris Fleizach.
+
+        I've found this additional information to be useful in other branches I'm working on.
+
+        * accessibility/isolatedtree/AXIsolatedTree.cpp:
+        (WebCore::AXIsolatedTree::removeSubtreeFromNodeMap):
+        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
+        (-[WebAccessibilityObjectWrapperBase detachIsolatedObject:]):
+
 2022-03-25  Youenn Fablet  <[email protected]>
 
         media/auto-play-web-audio-in-about-blank-iframe.html is failing on EWS MacOS Debug bot

Modified: trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp (291854 => 291855)


--- trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp	2022-03-25 15:55:40 UTC (rev 291854)
+++ trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp	2022-03-25 16:07:54 UTC (rev 291855)
@@ -490,13 +490,13 @@
     ASSERT(isMainThread());
 
     if (!m_nodeMap.contains(objectID)) {
-        AXLOG("Tried to remove AXID that is no longer in m_nodeMap.");
+        AXLOG(makeString("Tried to remove AXID ", objectID.loggingString(), " that is no longer in m_nodeMap."));
         return;
     }
 
     AXID axParentID = axParent ? axParent->objectID() : AXID();
     if (axParentID != m_nodeMap.get(objectID).parentID) {
-        AXLOG(makeString("Tried to remove object from a different parent ", axParentID.loggingString(), ", actual parent ", m_nodeMap.get(objectID).parentID.loggingString(), ", bailing out."));
+        AXLOG(makeString("Tried to remove object ID ", objectID.loggingString(), " from a different parent ", axParentID.loggingString(), ", actual parent ", m_nodeMap.get(objectID).parentID.loggingString(), ", bailing out."));
         return;
     }
 

Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm (291854 => 291855)


--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm	2022-03-25 15:55:40 UTC (rev 291854)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm	2022-03-25 16:07:54 UTC (rev 291855)
@@ -318,7 +318,14 @@
 #if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
 - (void)detachIsolatedObject:(AccessibilityDetachmentType)detachmentType
 {
-    ASSERT_UNUSED(detachmentType, detachmentType == AccessibilityDetachmentType::ElementChanged ? _identifier.isValid() && m_axObject : true);
+    ASSERT_WITH_MESSAGE_UNUSED(
+        detachmentType,
+        detachmentType == AccessibilityDetachmentType::ElementChanged ? _identifier.isValid() && m_axObject : true,
+        "isolated object was detached due to element change, but ID %s was invalid (%d) and/or m_axObject was nullptr (%d)",
+        _identifier.loggingString().utf8().data(),
+        !_identifier.isValid(),
+        !m_axObject
+    );
     m_isolatedObject = nullptr;
 }
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to