Skip to content

Fix crash attempting to get runtime when shutting down instance#16238

Merged
acoates-ms merged 2 commits into
mainfrom
crashjsinitshutdownmain
Jun 22, 2026
Merged

Fix crash attempting to get runtime when shutting down instance#16238
acoates-ms merged 2 commits into
mainfrom
crashjsinitshutdownmain

Conversation

@acoates-ms

@acoates-ms acoates-ms commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

If the instance is shutting down, the runtime can be cleared on the instance while JS code is running. If the JS triggers a turbomodule with a JSI Init function, then when it attempts to get the runtime to call the REACT_INIT function with it will crash.

Fix is to simply skip the REACT_INIT function if we are already shutting down the instance.

Microsoft Reviewers: Open in CodeFlow

@acoates-ms acoates-ms requested a review from a team as a code owner June 9, 2026 21:23
@acoates-ms acoates-ms enabled auto-merge (squash) June 9, 2026 21:40
@acoates-ms acoates-ms requested a review from a team as a code owner June 10, 2026 17:43
@acoates-ms acoates-ms force-pushed the crashjsinitshutdownmain branch from 4b68d13 to 1ba64fd Compare June 11, 2026 20:43
@acoates-ms acoates-ms merged commit 9fd45a5 into main Jun 22, 2026
32 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants