Skip to content

Inline onTransitionAnimationEnd and fix iterator invalidation in ViewTransitionModule#56104

Closed
zeyap wants to merge 1 commit intofacebook:mainfrom
zeyap:export-D96085815
Closed

Inline onTransitionAnimationEnd and fix iterator invalidation in ViewTransitionModule#56104
zeyap wants to merge 1 commit intofacebook:mainfrom
zeyap:export-D96085815

Conversation

@zeyap
Copy link
Copy Markdown
Contributor

@zeyap zeyap commented Mar 15, 2026

Summary:
startViewTransitionEnd was removing entries from nameRegistry_ while iterating over it via onTransitionAnimationEnd, which is undefined behavior.

This diff improves the fix by:

  • Inlining onTransitionAnimationEnd (private, single call site)
  • Clearing nameRegistry_ after the loop instead of erasing during iteration, removing the need for a copy

Changelog:

[Internal] [Fixed] - Inline onTransitionAnimationEnd and fix iterator invalidation in ViewTransitionModule

Reviewed By: christophpurrer

Differential Revision: D96085815

…TransitionModule

Summary:
`startViewTransitionEnd` was removing entries from `nameRegistry_` while iterating over it via `onTransitionAnimationEnd`, which is undefined behavior.

This diff improves the fix by:
  - Inlining `onTransitionAnimationEnd` (private, single call site)
  - Clearing `nameRegistry_` after the loop instead of erasing during iteration, removing the need for a copy

## Changelog:

[Internal] [Fixed] - Inline onTransitionAnimationEnd and fix iterator invalidation in ViewTransitionModule

Reviewed By: christophpurrer

Differential Revision: D96085815
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Mar 15, 2026

@zeyap has exported this pull request. If you are a Meta employee, you can view the originating Diff in D96085815.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 15, 2026
@meta-codesync meta-codesync bot closed this in 670d769 Mar 16, 2026
@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @zeyap in 670d769

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Mar 16, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Mar 16, 2026

This pull request has been merged in 670d769.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants