Changeset 263572 in webkit
- Timestamp:
- Jun 26, 2020 12:20:06 PM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r263571 r263572 1 2020-06-26 Andres Gonzalez <andresg_22@apple.com> 2 3 Access to AXIsolatedTree:m_readerThreadNodeMap should happen only on the secondary AX thread. 4 https://bugs.webkit.org/show_bug.cgi?id=213575 5 6 Reviewed by Chris Fleizach. 7 8 After calling AXObjectCache::initializeSecondaryAXThread, there may 9 still be some client requests coming in on the main thread. Thus 10 AXIsolatedTree::applyPendingchanges and nodeForID can be called on the 11 main thread. Since these two methods access the member variable 12 m_readerThreadNodeMap which should be accessed only on the secondary AX 13 thread, we now check for this condition and bail out if needed. 14 15 * accessibility/isolatedtree/AXIsolatedTree.cpp: 16 (WebCore::AXIsolatedTree::nodeForID const): 17 (WebCore::AXIsolatedTree::applyPendingChanges): 18 * accessibility/isolatedtree/AXIsolatedTree.h: Reordered private methods 19 above member variables to comply with WebKit coding conventions, 20 pointed out by Darin Adler in review for https://bugs.webkit.org/show_bug.cgi?id=213435. 21 1 22 2020-06-26 Andres Gonzalez <andresg_22@apple.com> 2 23 -
trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp
r263571 r263572 141 141 RefPtr<AXIsolatedObject> AXIsolatedTree::nodeForID(AXID axID) const 142 142 { 143 // FIXME: The following ASSERT should be met but it is commented out at the144 // moment because of <rdar://problem/63985646> After calling _AXUIElementUseSecondaryAXThread(true),145 // still receives client request on main thread.146 // ASSERT(axObjectCache()->canUseSecondaryAXThread() ? !isMainThread() : isMainThread()); 143 // In isolated tree mode 2, only access m_readerThreadNodeMap on the AX thread. 144 if (axObjectCache()->canUseSecondaryAXThread() && isMainThread()) 145 return nullptr; 146 147 147 return axID != InvalidAXID ? m_readerThreadNodeMap.get(axID) : nullptr; 148 148 } … … 394 394 { 395 395 AXTRACE("AXIsolatedTree::applyPendingChanges"); 396 397 // In isolated tree mode 2, only apply pending changes on the AX thread. 398 if (axObjectCache()->canUseSecondaryAXThread() && isMainThread()) 399 return; 400 396 401 LockHolder locker { m_changeLogLock }; 397 402 -
trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h
r263378 r263572 99 99 void clear(); 100 100 101 AXIsolatedTreeID m_treeID;102 101 static HashMap<AXIsolatedTreeID, Ref<AXIsolatedTree>>& treeIDCache(); 103 102 static HashMap<PageIdentifier, Ref<AXIsolatedTree>>& treePageCache(); … … 107 106 // Queues all pending additions to the tree as the result of a subtree generation. 108 107 void appendNodeChanges(Vector<NodeChange>&&); 108 // Called on main thread to update both m_nodeMap and m_pendingChildrenUpdates. 109 void updateChildrenIDs(AXID axID, Vector<AXID>&& childrenIDs); 109 110 111 AXIsolatedTreeID m_treeID; 110 112 AXObjectCache* m_axObjectCache { nullptr }; 111 113 … … 124 126 AXID m_focusedNodeID { InvalidAXID }; 125 127 Lock m_changeLogLock; 126 127 // Called on main thread to updates both m_nodeMap and m_pendingChildrenUpdates.128 void updateChildrenIDs(AXID axID, Vector<AXID>&& childrenIDs);129 128 }; 130 129
Note: See TracChangeset
for help on using the changeset viewer.