Skip to content

Commit

Permalink
REGRESSION (274894@main): [ iOS Debug ] accessibility/text-marker/tex…
Browse files Browse the repository at this point in the history
…t-marker-range-stale-node-crash.html is a constant crash

https://bugs.webkit.org/show_bug.cgi?id=270477
rdar://124030130

Reviewed by Chris Dumez.

Node may have started destruction by the time the RefPtr is created.

* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::characterOffsetForTextMarkerData):

Canonical link: https://commits.webkit.org/275695@main
  • Loading branch information
charliewolfe authored and Ahmad Saleem committed Mar 5, 2024
1 parent a8f281f commit f3f8811
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/WebCore/accessibility/AXObjectCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2795,7 +2795,7 @@ CharacterOffset AXObjectCache::characterOffsetForTextMarkerData(TextMarkerData&
if (textMarkerData.ignored)
return { };

RefPtr node = textMarkerData.node;
RefPtrAllowingPartiallyDestroyed<Node> node = textMarkerData.node;
if (!node || !isNodeInUse(*node))
return { };

Expand Down

0 comments on commit f3f8811

Please sign in to comment.