Skip to content

Commit d1ab032

Browse files
Andrei Shikovfacebook-github-bot
authored andcommitted
Remove feature flag for layout transition tag cleanup
Summary: Removes stale feature flag that was in production for a couple of months. Fix helped to decrease number of crashes significantly, so we can remove it. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D28757995 fbshipit-source-id: 375da09c11f265e8bbe03cd99de1b83f168420ce
1 parent 8a5ee96 commit d1ab032

File tree

3 files changed

+11
-23
lines changed

3 files changed

+11
-23
lines changed

ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ public interface FlagProvider {
4444
/** This feature flag enables logs for Fabric */
4545
public static boolean enableFabricLogs = false;
4646

47-
/**
48-
* Temporary feature flat to control a fix in the transition to layoutOnlyViews TODO T61185028:
49-
* remove this when bug is fixed
50-
*/
51-
public static boolean enableTransitionLayoutOnlyViewCleanup = false;
52-
5347
/** Feature flag to configure eager initialization of Fabric */
5448
public static boolean eagerInitializeFabric = false;
5549

ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyOptimizer.java

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import com.facebook.infer.annotation.Assertions;
1414
import com.facebook.react.bridge.ReadableArray;
1515
import com.facebook.react.bridge.ReadableMapKeySetIterator;
16-
import com.facebook.react.config.ReactFeatureFlags;
1716

1817
/**
1918
* Class responsible for optimizing the native view hierarchy while still respecting the final UI
@@ -425,18 +424,16 @@ private void transitionLayoutOnlyViewToNativeView(
425424
// Bit of a hack: we need to update the layout of this node's children now that it's no longer
426425
// layout-only, but we may still receive more layout updates at the end of this batch that we
427426
// don't want to ignore.
428-
if (ReactFeatureFlags.enableTransitionLayoutOnlyViewCleanup) {
429-
FLog.i(
430-
TAG,
431-
"Transitioning LayoutOnlyView - tag: "
432-
+ node.getReactTag()
433-
+ " - rootTag: "
434-
+ node.getRootTag()
435-
+ " - hasProps: "
436-
+ (props != null)
437-
+ " - tagsWithLayout.size: "
438-
+ mTagsWithLayoutVisited.size());
439-
}
427+
FLog.i(
428+
TAG,
429+
"Transitioning LayoutOnlyView - tag: "
430+
+ node.getReactTag()
431+
+ " - rootTag: "
432+
+ node.getRootTag()
433+
+ " - hasProps: "
434+
+ (props != null)
435+
+ " - tagsWithLayout.size: "
436+
+ mTagsWithLayoutVisited.size());
440437
Assertions.assertCondition(mTagsWithLayoutVisited.size() == 0);
441438
applyLayoutBase(node);
442439
for (int i = 0; i < node.getChildCount(); i++) {

ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import com.facebook.react.bridge.UiThreadUtil;
2222
import com.facebook.react.bridge.WritableArray;
2323
import com.facebook.react.common.ReactConstants;
24-
import com.facebook.react.config.ReactFeatureFlags;
2524
import com.facebook.react.modules.i18nmanager.I18nUtil;
2625
import com.facebook.react.uimanager.debug.NotThreadSafeViewHierarchyUpdateDebugListener;
2726
import com.facebook.react.uimanager.events.EventDispatcher;
@@ -965,9 +964,7 @@ protected void applyUpdatesRecursive(ReactShadowNode cssNode, float absoluteX, f
965964
}
966965
}
967966
cssNode.markUpdateSeen();
968-
if (ReactFeatureFlags.enableTransitionLayoutOnlyViewCleanup) {
969-
mNativeViewHierarchyOptimizer.onViewUpdatesCompleted(cssNode);
970-
}
967+
mNativeViewHierarchyOptimizer.onViewUpdatesCompleted(cssNode);
971968
}
972969

973970
public void addUIBlock(UIBlock block) {

0 commit comments

Comments
 (0)