From 77c860898e3ec8a195fb4f5cc2247665ff6df3a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Norte?= Date: Tue, 27 May 2025 04:17:13 -0700 Subject: [PATCH] Fix missing willPerformAsynchronously parameter in calls to MountingCoordinator::pullTransaction (#51618) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51618 Changelog: [internal] This sets the argument to `pullTransaction` to `true` in the cases where the call is done from the JS thread and the transactions are mounted asynchronously in the UI thread (basically platforms using the push model for mounting coordinator). It was missing on an experiment for Android (compatibility mode for Props 2.0) Reviewed By: lenaic Differential Revision: D75439105 fbshipit-source-id: a106a3a674e44b0cf2603782302343f60ee5450e --- .../src/main/jni/react/fabric/FabricUIManagerBinding.cpp | 3 ++- .../ReactCommon/react/renderer/mounting/MountingCoordinator.h | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp index 2abaa0a06b7..1fdf3cbcc68 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp @@ -630,7 +630,8 @@ void FabricUIManagerBinding::schedulerShouldRenderTransactions( return; } if (ReactNativeFeatureFlags::enableAccumulatedUpdatesInRawPropsAndroid()) { - auto mountingTransaction = mountingCoordinator->pullTransaction(); + auto mountingTransaction = mountingCoordinator->pullTransaction( + /* willPerformAsynchronously = */ true); if (mountingTransaction.has_value()) { auto transaction = std::move(*mountingTransaction); mountingManager->executeMount(transaction); diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/MountingCoordinator.h b/packages/react-native/ReactCommon/react/renderer/mounting/MountingCoordinator.h index 4042a446ad9..229e74897eb 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/MountingCoordinator.h +++ b/packages/react-native/ReactCommon/react/renderer/mounting/MountingCoordinator.h @@ -62,7 +62,6 @@ class MountingCoordinator final { * `true` until `didPerformAsyncTransactions` is called. */ std::optional pullTransaction( - // TODO: Clean up this parameter when Android migrates to a pull model. bool willPerformAsynchronously = false) const; /*