mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Changelog: [Internal] Calls to `surfaceHandler.start()` and `setDisplayMode(DisplayMode::Visible)` in quick succession on different threads can cause a race condition between mount and commit operations. The mountingCoordinator will try to mount an empty revision without any commits causing it to fail with: ``` TransactionTelemetry.cpp:108: function getCommitStartTime: assertion failed (commitStartTime_ != kTelemetryUndefinedTimePoint) ``` which is called from [Binding.cpp](https://www.internalfb.com/intern/diffusion/FBS/browse/master/xplat/js/react-native-github/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp?lines=791-791&blame=1). This change avoids this initial commit by verifying we had at least 1 revision commited before mounting it. Reviewed By: sammy-SC Differential Revision: D27430174 fbshipit-source-id: d208d55f02cd218a316d6fea62d0106c2bcb4be8