From 899b314ca2e28aceaa0d04c09602b419cac25232 Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Wed, 4 Mar 2020 04:57:48 -0800 Subject: [PATCH] Back out "Pass layoutContext to Yoga's MeasureCallback" Summary: Passing `layoutContext` to yoga crashes fb4a-64. Until I have a solution let's back this out. Original commit changeset: 9df7da4bef8c Changelog: [Internal] Reviewed By: makovkastar Differential Revision: D20246917 fbshipit-source-id: 220744fde9f74e8157fc0714c63639b01152e4ab --- .../components/view/yoga/YogaLayoutableShadowNode.cpp | 10 +++------- .../components/view/yoga/YogaLayoutableShadowNode.h | 3 +-- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp b/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp index 0c87c9094ec..f4bd3ca6ddd 100644 --- a/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp +++ b/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp @@ -245,11 +245,8 @@ void YogaLayoutableShadowNode::layoutTree( { SystraceSection s("YogaLayoutableShadowNode::YGNodeCalculateLayout"); - YGNodeCalculateLayoutWithContext(&yogaNode_, - availableWidth, - availableHeight, - YGDirectionInherit, - &layoutContext); + YGNodeCalculateLayout( + &yogaNode_, availableWidth, availableHeight, YGDirectionInherit); } layout(layoutContext); @@ -323,8 +320,7 @@ YGSize YogaLayoutableShadowNode::yogaNodeMeasureCallbackConnector( float width, YGMeasureMode widthMode, float height, - YGMeasureMode heightMode, - void *layoutContext) { + YGMeasureMode heightMode) { SystraceSection s( "YogaLayoutableShadowNode::yogaNodeMeasureCallbackConnector"); diff --git a/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.h b/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.h index 303609b7541..ceb0de20f6a 100644 --- a/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.h +++ b/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.h @@ -121,8 +121,7 @@ class YogaLayoutableShadowNode : public LayoutableShadowNode { float width, YGMeasureMode widthMode, float height, - YGMeasureMode heightMode, - void *layoutContext); + YGMeasureMode heightMode); }; template <>