From fc2417141662a2ff7f8d4d8e3df75263662f0735 Mon Sep 17 00:00:00 2001 From: Eric Rozell Date: Wed, 13 Nov 2024 06:29:35 -0800 Subject: [PATCH] Revert "Extra log for case where availableHeight is undefined and sizing mode != max content (#1687)" (#47581) Summary: X-link: https://github.com/facebook/yoga/pull/1741 Pull Request resolved: https://github.com/facebook/react-native/pull/47581 Reverting https://github.com/facebook/yoga/pull/1687 as it appears to regress Yoga performance anywhere from 10-33%. ## Changelog [Internal] Reviewed By: rshest Differential Revision: D65863569 fbshipit-source-id: e6992e05dd59ba75548a5d633cb7f5c3fa99a6e4 --- .../yoga/yoga/algorithm/CalculateLayout.cpp | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/packages/react-native/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp b/packages/react-native/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp index b9758d8cfe0..54d03e11371 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp +++ b/packages/react-native/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include @@ -693,13 +692,6 @@ static float distributeFreeSpaceSecondPass( } } - yoga::assertFatalWithNode( - currentLineChild, - yoga::isDefined(updatedMainSize), - ("updatedMainSize is undefined. mainAxisOwnerSize: " + - std::to_string(mainAxisOwnerSize)) - .c_str()); - deltaFreeSpace += updatedMainSize - childFlexBasis; const float marginMain = currentLineChild->style().computeMarginForAxis( @@ -793,20 +785,6 @@ static float distributeFreeSpaceSecondPass( const bool isLayoutPass = performLayout && !requiresStretchLayout; // Recursively call the layout algorithm for this child with the updated // main size. - - yoga::assertFatalWithNode( - currentLineChild, - yoga::isUndefined(childMainSize) - ? childMainSizingMode == SizingMode::MaxContent - : true, - "childMainSize is undefined so childMainSizingMode must be MaxContent"); - yoga::assertFatalWithNode( - currentLineChild, - yoga::isUndefined(childCrossSize) - ? childCrossSizingMode == SizingMode::MaxContent - : true, - "childCrossSize is undefined so childCrossSizingMode must be MaxContent"); - calculateLayoutInternal( currentLineChild, childWidth,