Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitize measure function results #44557

Closed
wants to merge 1 commit into from

Commits on May 13, 2024

  1. Sanitize measure function results

    Summary:
    We've started seeing assertion failures in Yoga where a `NaN` value makes its way to an `availableHeight` constraint when measuring Litho tree.
    
    Because it's only happening on Litho, I have some suspicion this might be originating from a Litho-specific measure function. This adds sanitization in Yoga to measure function results, where we will log an error, and set size to zero, if either dimension ends up being negative of `NaN`.
    
    This doesn't really help track down where the error was happening, but Yoga doesn't have great context to show this to begin with. If we see this is issue, next steps would be Litho internal intrumentation to find culprit.
    
    Changelog: [Internal]
    
    Differential Revision: D57285584
    NickGerleman authored and facebook-github-bot committed May 13, 2024
    Configuration menu
    Copy the full SHA
    3e2640d View commit details
    Browse the repository at this point in the history