Skip to content

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

Open
acoates-ms wants to merge 2 commits into
mainfrom
crashjsinitshutdownmain
Open

Fix crash attempting to get runtime when shutting down instance#16238
acoates-ms wants to merge 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
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