From 3e46cb384c82e065b8e852fc08db65fb52797f6b Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Thu, 31 Oct 2024 06:47:13 -0700 Subject: [PATCH] Downgrade fatal error in FabricMountingManager (#47329) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47329 Downgrading from fatal (introduced in D63148523). It's not yet clear why this is firing, and may point at deeper underlying issues, as the re-ordering we do in `disableMountItemReorderingAndroid` only occurs at a later point in `FabricMountingManager`. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D65267936 fbshipit-source-id: cb32b149a77c9e5a3ac6350baaeae9c7215df01b --- .../src/main/jni/react/fabric/FabricMountingManager.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp index e0c09f917d2..dc75888a0ab 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp @@ -495,7 +495,8 @@ void FabricMountingManager::executeMount( ? allocatedViewsIterator->second : defaultAllocatedViews; if (allocatedViewsIterator == allocatedViewRegistry_.end()) { - LOG(ERROR) << "Executing commit after surface was stopped!"; + LOG(ERROR) << "Executing commit after surface " << surfaceId + << " was stopped!"; } for (const auto& mutation : mutations) { @@ -529,7 +530,7 @@ void FabricMountingManager::executeMount( (maintainMutationOrder ? cppCommonMountItems : cppDeleteMountItems) .push_back(CppMountItem::DeleteMountItem(oldChildShadowView)); if (allocatedViewTags.erase(oldChildShadowView.tag) != 1) { - LOG(ERROR) << "Emitting delete for unallocated view. " + LOG(ERROR) << "Emitting delete for unallocated view " << oldChildShadowView.tag; } break; @@ -537,7 +538,7 @@ void FabricMountingManager::executeMount( case ShadowViewMutation::Update: { if (!isVirtual) { if (!allocatedViewTags.contains(newChildShadowView.tag)) { - LOG(FATAL) << "Emitting update for unallocated view. " + LOG(ERROR) << "Emitting update for unallocated view " << newChildShadowView.tag; } @@ -605,7 +606,7 @@ void FabricMountingManager::executeMount( bool shouldCreateView = !allocatedViewTags.contains(newChildShadowView.tag); if (shouldCreateView) { - LOG(ERROR) << "Emitting insert for unallocated view. " + LOG(ERROR) << "Emitting insert for unallocated view " << newChildShadowView.tag; (maintainMutationOrder ? cppCommonMountItems : cppUpdatePropsMountItems)