Title: [262463] trunk/Source/WebCore
Revision
262463
Author
andresg...@apple.com
Date
2020-06-02 16:59:24 -0700 (Tue, 02 Jun 2020)

Log Message

AXIsolatedTree::updateNode should not call nodeForID.
https://bugs.webkit.org/show_bug.cgi?id=212662

Reviewed by Chris Fleizach.

In isolated tree mode AXIsolatedTree::nodeForID should be called only
on the secondary AX thread. So removing the need to call nodeForID in
updateNode by using AXCoreObject::childrenIDs() instead of retrieving
the isolated node to access its children IDs.

* accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::updateNode):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (262462 => 262463)


--- trunk/Source/WebCore/ChangeLog	2020-06-02 23:52:01 UTC (rev 262462)
+++ trunk/Source/WebCore/ChangeLog	2020-06-02 23:59:24 UTC (rev 262463)
@@ -1,3 +1,18 @@
+2020-06-02  Andres Gonzalez  <andresg...@apple.com>
+
+        AXIsolatedTree::updateNode should not call nodeForID.
+        https://bugs.webkit.org/show_bug.cgi?id=212662
+
+        Reviewed by Chris Fleizach.
+
+        In isolated tree mode AXIsolatedTree::nodeForID should be called only
+        on the secondary AX thread. So removing the need to call nodeForID in
+        updateNode by using AXCoreObject::childrenIDs() instead of retrieving
+        the isolated node to access its children IDs.
+
+        * accessibility/isolatedtree/AXIsolatedTree.cpp:
+        (WebCore::AXIsolatedTree::updateNode):
+
 2020-06-02  Keith Rollin  <krol...@apple.com>
 
         Revert FEATURES_DEFINES related changes

Modified: trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp (262462 => 262463)


--- trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp	2020-06-02 23:52:01 UTC (rev 262462)
+++ trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp	2020-06-02 23:59:24 UTC (rev 262463)
@@ -198,17 +198,16 @@
     AXTRACE("AXIsolatedTree::updateNode");
     AXLOG(&axObject);
     ASSERT(isMainThread());
+
     AXID axID = axObject.objectID();
     auto* axParent = axObject.parentObject();
     AXID parentID = axParent ? axParent->objectID() : InvalidAXID;
 
-    LockHolder locker { m_changeLogLock };
-    if (auto object = nodeForID(axID)) {
-        ASSERT(object->objectID() == axID);
-        auto newObject = AXIsolatedObject::create(axObject, m_treeID, parentID);
+    auto newObject = AXIsolatedObject::create(axObject, m_treeID, parentID);
+    newObject->m_childrenIDs = axObject.childrenIDs();
 
-        // The new object should have the same children as the old one.
-        newObject->m_childrenIDs = object->m_childrenIDs;
+    {
+        LockHolder locker { m_changeLogLock };
         // Remove the old object and set the new one to be updated on the AX thread.
         m_pendingNodeRemovals.append(axID);
         m_pendingAppends.append(NodeChange(newObject, axObject.wrapper()));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to