Skip to content

Commit

Permalink
Extra log for case where availableHeight is undefined and sizing mode…
Browse files Browse the repository at this point in the history
… != max content

Summary:
We are seeing some crashes that are hard to wrap our head around. Lets add more logs. I chose these values based on what could make the height/width undefined from looking at the code. We might need more but this should give us some more direction.

Changelog: [Internal]

Differential Revision: D61054392
  • Loading branch information
joevilches authored and facebook-github-bot committed Aug 9, 2024
1 parent 603eb94 commit e13e63a
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,21 @@ static float distributeFreeSpaceSecondPass(
const bool isLayoutPass = performLayout && !requiresStretchLayout;
// Recursively call the layout algorithm for this child with the updated
// main size.

if (yoga::isUndefined(childHeight) &&
childHeightSizingMode != SizingMode::MaxContent) {
yoga::log(
currentLineChild,
LogLevel::Warn,
"Child height is undefined and sizing mode is not max content. [childMainSize=%f, childCrossSize=%f, updatedMainSize=%f, marginMain=%f, marginCross=%f, childFlexBasis=%f]",
childMainSize,
childCrossSize,
updatedMainSize,
marginMain,
marginCross,
childFlexBasis);
}

calculateLayoutInternal(
currentLineChild,
childWidth,
Expand Down

0 comments on commit e13e63a

Please sign in to comment.