From 847721dc9bacfa4c13cbe35a91bf0c1e5feee0f7 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Thu, 17 Jul 2025 09:02:19 -0700 Subject: [PATCH] Add missing attempts++ in ShadowNode with MAX_COMMIT_ATTEMPTS_BEFORE_LOCKING (#52673) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52673 We should be incrementing the `attempts` variable as otherwise this loop with never stop. Created from CodeHub with https://fburl.com/edit-in-codehub Changelog: [Internal] - Reviewed By: rubennorte Differential Revision: D78487202 fbshipit-source-id: 91d7f5d88a90bdfa806195fd35897f2f51c1deb9 --- .../ReactCommon/react/renderer/mounting/ShadowTree.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTree.cpp b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTree.cpp index a1bbf319114..c803f80e027 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTree.cpp +++ b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTree.cpp @@ -251,6 +251,7 @@ CommitStatus ShadowTree::commit( if (status != CommitStatus::Failed) { return status; } + attempts++; } {