From 39689bd9691a861aab3d740910ca828f715ebb0a Mon Sep 17 00:00:00 2001 From: Joshua Gross Date: Sat, 22 Aug 2020 22:39:48 -0700 Subject: [PATCH] Add additional verbose logging to MountingManager.java Summary: In MountingManager.java in Fabric, if we drop a view with any attached views, we also drop all children. If verbose logging is turned on, log all instances of that happening. This has no impact unless you switch the flag on manually in debug mode. Changelog: [Internal] Differential Revision: D23257749 fbshipit-source-id: fce4476aa47cc1b7137cd9fd2fd0241af1593288 --- .../facebook/react/fabric/mounting/MountingManager.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.java b/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.java index bd7f4ec3c0..0e951ed4db 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.java @@ -120,6 +120,15 @@ public class MountingManager { for (int i = viewGroupManager.getChildCount(viewGroup) - 1; i >= 0; i--) { View child = viewGroupManager.getChildAt(viewGroup, i); if (getNullableViewState(child.getId()) != null) { + if (SHOW_CHANGED_VIEW_HIERARCHIES) { + FLog.e( + TAG, + "Automatically dropping view that is still attached to a parent being dropped. Parent: [" + + reactTag + + "] child: [" + + child.getId() + + "]"); + } dropView(child); } viewGroupManager.removeViewAt(viewGroup, i);