Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 321a482

Browse files
authored
Fix AccessibilityBridge crash due to invalid access during ReplaceSemanticsObject (#31351)
1 parent 0f6db11 commit 321a482

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ static void ReplaceSemanticsObject(SemanticsObject* oldObject,
242242
assert(oldObject.node.id == newObject.uid);
243243
NSNumber* nodeId = @(oldObject.node.id);
244244
NSUInteger positionInChildlist = [oldObject.parent.children indexOfObject:oldObject];
245+
[[oldObject retain] autorelease];
245246
[objects removeObjectForKey:nodeId];
246247
[oldObject.parent replaceChildAtIndex:positionInChildlist withChild:newObject];
247248
objects[nodeId] = newObject;

0 commit comments

Comments
 (0)