E588 AX: AXIsolatedTree should hold a WeakPtr to the AXObjectCache. · WebKit/WebKit@49d32a5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 49d32a5

Browse files
AX: AXIsolatedTree should hold a WeakPtr to the AXObjectCache.
https://bugs.webkit.org/show_bug.cgi?id=251151 <rdar://problem/104645083> Reviewed by Chris Fleizach. Replaced the raw pointer to AXObjectCache with a WeakPtr. Audited that we are checking for null everywhere we access this instance variable. * Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h: (WebCore::AXIsolatedTree::axObjectCache const): Canonical link: https://commits.webkit.org/259398@main
1 parent 97b9f04 commit 49d32a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ class AXIsolatedTree : public ThreadSafeRefCounted<AXIsolatedTree>
359359
void queueRemovalsAndUnresolvedChanges(Vector<AXID>&&);
9303
360360

361361
unsigned m_maxTreeDepth { 0 };
362-
AXObjectCache* m_axObjectCache { nullptr };
362+
WeakPtr<AXObjectCache> m_axObjectCache;
363363
bool m_usedOnAXThread { true };
364364

365365
// Stores the parent ID and children IDS for a given IsolatedObject.
@@ -407,7 +407,7 @@ class AXIsolatedTree : public ThreadSafeRefCounted<AXIsolatedTree>
407407
inline AXObjectCache* AXIsolatedTree::axObjectCache() const
408408
{
409409
ASSERT(isMainThread());
410-
return m_axObjectCache;
410+
return m_axObjectCache.get();
411411
}
412412

413413
inline RefPtr<AXIsolatedTree> AXIsolatedTree::treeForPageID(std::optional<PageIdentifier> pageID)

0 commit comments

Comments
 (0)
0