Skip to content

Conversation

@gaearon
Copy link
Collaborator

@gaearon gaearon commented Dec 9, 2025

Speculative fix to #35336 written by Claude.

I have verified that applying a similar patch locally to the repro from #35336 does fix the crash.

I'm not familiar enough with the underlying APIs to tell whether the fix is correct or sufficient.

@meta-cla meta-cla bot added the CLA Signed label Dec 9, 2025
@gaearon gaearon requested a review from sebmarkbage December 9, 2025 12:40
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Dec 9, 2025
@react-sizebot
Copy link

react-sizebot commented Dec 9, 2025

Comparing: 55480b4...95d7331

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.84 kB 6.84 kB = 1.88 kB 1.88 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 608.36 kB 608.16 kB = 107.68 kB 107.67 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.84 kB 6.84 kB = 1.88 kB 1.88 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 667.47 kB 667.39 kB = 117.57 kB 117.55 kB
facebook-www/ReactDOM-prod.classic.js = 693.67 kB 693.47 kB = 122.07 kB 122.05 kB
facebook-www/ReactDOM-prod.modern.js = 684.10 kB 683.89 kB = 120.45 kB 120.43 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 95d7331

Copy link
Collaborator

@sebmarkbage sebmarkbage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is probably ok.

@sebmarkbage
Copy link
Collaborator

Not sure if it fixes it in all cases though if the staleness also happens to apply to any of these.

@gaearon
Copy link
Collaborator Author

gaearon commented Dec 9, 2025

Yea not sure, I guess let's try it and see if I can hit it again at some other codepath

@gaearon gaearon changed the title [Speculative fix] Fix ViewTransition crash in Mobile Safari Fix ViewTransition crash in Mobile Safari Dec 9, 2025
@gaearon gaearon merged commit 61331f3 into main Dec 9, 2025
239 checks passed
@gaearon gaearon deleted the maybe-fix-vt branch December 9, 2025 18:35
github-actions bot pushed a commit that referenced this pull request Dec 9, 2025
Speculative fix to #35336
written by Claude.

I have verified that applying a similar patch locally to the repro from
#35336 does fix the crash.

I'm not familiar enough with the underlying APIs to tell whether the fix
is correct or sufficient.

DiffTrain build for [61331f3](61331f3)
github-actions bot pushed a commit to code/lib-react that referenced this pull request Dec 14, 2025
Speculative fix to facebook#35336
written by Claude.

I have verified that applying a similar patch locally to the repro from
facebook#35336 does fix the crash.

I'm not familiar enough with the underlying APIs to tell whether the fix
is correct or sufficient.

DiffTrain build for [61331f3](facebook@61331f3)
@sebmarkbage
Copy link
Collaborator

One unfortunate consequence of this is that if you spawn custom Animations using the refs passed to onExit, onEnter, onUpdate, onShare callbacks. E.g. to do JS powered animations. If you do that then they're not automatically cancelled by this mechanism since they're started later. There's no signal coming from React for when to cancel the animation.

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

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants