Title: [255311] trunk/Source/WebCore
Revision
255311
Author
[email protected]
Date
2020-01-28 14:10:05 -0800 (Tue, 28 Jan 2020)

Log Message

Properly clear pending changes during AXIsolatedTree removal and applyPendingChanges.
https://bugs.webkit.org/show_bug.cgi?id=206879

Reviewed by Chris Fleizach.

- After applying pending changes clear the m_pendingAppends and
m_pendingRemovals, so that they are not applied again.
- Also clear these variables when the IsolatedTree is being removed in
the main thread, so that requests in the accessibility thread do not
cause adding changes to a dead tree.

* accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::removeTreeForPageID):
(WebCore::AXIsolatedTree::applyPendingChanges):
* accessibility/isolatedtree/AXIsolatedTree.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (255310 => 255311)


--- trunk/Source/WebCore/ChangeLog	2020-01-28 22:04:58 UTC (rev 255310)
+++ trunk/Source/WebCore/ChangeLog	2020-01-28 22:10:05 UTC (rev 255311)
@@ -1,3 +1,21 @@
+2020-01-28  Andres Gonzalez  <[email protected]>
+
+        Properly clear pending changes during AXIsolatedTree removal and applyPendingChanges.
+        https://bugs.webkit.org/show_bug.cgi?id=206879
+
+        Reviewed by Chris Fleizach.
+
+        - After applying pending changes clear the m_pendingAppends and
+        m_pendingRemovals, so that they are not applied again.
+        - Also clear these variables when the IsolatedTree is being removed in
+        the main thread, so that requests in the accessibility thread do not
+        cause adding changes to a dead tree.
+
+        * accessibility/isolatedtree/AXIsolatedTree.cpp:
+        (WebCore::AXIsolatedTree::removeTreeForPageID):
+        (WebCore::AXIsolatedTree::applyPendingChanges):
+        * accessibility/isolatedtree/AXIsolatedTree.h:
+
 2020-01-28  Don Olmstead  <[email protected]>
 
         [LFC][Integration] Build and enable on Windows

Modified: trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp (255310 => 255311)


--- trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp	2020-01-28 22:04:58 UTC (rev 255310)
+++ trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp	2020-01-28 22:10:05 UTC (rev 255311)
@@ -99,6 +99,8 @@
             if (auto object = tree->nodeForID(axID))
                 object->detach(AccessibilityDetachmentType::CacheDestroyed);
         }
+        tree->m_pendingAppends.clear();
+        tree->m_pendingRemovals.clear();
         tree->m_readerThreadNodeMap.clear();
         treeLocker.unlockEarly();
 
@@ -171,6 +173,7 @@
 
     for (auto& item : m_pendingAppends)
         m_readerThreadNodeMap.add(item->objectID(), WTFMove(item));
+    m_pendingAppends.clear();
 
     for (auto& item : m_pendingRemovals) {
         if (auto object = nodeForID(item))
@@ -177,6 +180,7 @@
             object->detach(AccessibilityDetachmentType::ElementDestroyed);
         m_readerThreadNodeMap.remove(item);
     }
+    m_pendingRemovals.clear();
 }
     
 } // namespace WebCore

Modified: trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h (255310 => 255311)


--- trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h	2020-01-28 22:04:58 UTC (rev 255310)
+++ trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h	2020-01-28 22:10:05 UTC (rev 255311)
@@ -64,7 +64,7 @@
     void setFocusedNodeID(AXID);
     
     // Call on AX thread
-    WEBCORE_EXPORT void applyPendingChanges();
+    void applyPendingChanges();
 
     AXIsolatedTreeID treeIdentifier() const { return m_treeID; }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to