Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor RCT_handleKeyCommand to avoid concurrency issues (#42708)
Summary: Pull Request resolved: #42708 When pressing `r` on simulator in Bridgeless mode, we have a race condition between: - RCTKeyCommands evaluating the blocks to be invoked - ReactNative invalidating the DevMenu with the list of RCTKeyCommands (on which ReactNative is iterating). The fix checks which commands need to be executed, stores them in an array and then iterates on the array, which is local to the function call, avoiding any concurrency issue. ## Changelog: [iOS][Fixed] - Refactored RCT_handleKeyCommand to avoid concurrency issues Reviewed By: motiz88 Differential Revision: D53186262 fbshipit-source-id: 60ae8974a9df7289395c8a9e9abe2e34e4c40309
- Loading branch information