diff --git a/ReactCommon/fabric/core/shadownode/ShadowNode.cpp b/ReactCommon/fabric/core/shadownode/ShadowNode.cpp index 453c2227797..3f10dd555c4 100644 --- a/ReactCommon/fabric/core/shadownode/ShadowNode.cpp +++ b/ReactCommon/fabric/core/shadownode/ShadowNode.cpp @@ -45,9 +45,9 @@ ShadowNode::ShadowNode( : emptySharedShadowNodeSharedList()), state_(fragment.state), family_(std::make_shared( - fragment.tag, - fragment.surfaceId, - fragment.eventEmitter, + ShadowNodeFamilyFragment{fragment.tag, + fragment.surfaceId, + fragment.eventEmitter}, componentDescriptor)), traits_(traits) { assert(props_); diff --git a/ReactCommon/fabric/core/shadownode/ShadowNodeFamily.cpp b/ReactCommon/fabric/core/shadownode/ShadowNodeFamily.cpp index bc72bc0e34d..30a74b54a00 100644 --- a/ReactCommon/fabric/core/shadownode/ShadowNodeFamily.cpp +++ b/ReactCommon/fabric/core/shadownode/ShadowNodeFamily.cpp @@ -13,13 +13,11 @@ namespace facebook { namespace react { ShadowNodeFamily::ShadowNodeFamily( - Tag tag, - SurfaceId surfaceId, - SharedEventEmitter const &eventEmitter, + ShadowNodeFamilyFragment const &fragment, ComponentDescriptor const &componentDescriptor) - : tag_(tag), - surfaceId_(surfaceId), - eventEmitter_(eventEmitter), + : tag_(fragment.tag), + surfaceId_(fragment.surfaceId), + eventEmitter_(fragment.eventEmitter), componentDescriptor_(componentDescriptor), componentHandle_(componentDescriptor.getComponentHandle()), componentName_(componentDescriptor.getComponentName()) {} diff --git a/ReactCommon/fabric/core/shadownode/ShadowNodeFamily.h b/ReactCommon/fabric/core/shadownode/ShadowNodeFamily.h index f268f98b26a..43500a88767 100644 --- a/ReactCommon/fabric/core/shadownode/ShadowNodeFamily.h +++ b/ReactCommon/fabric/core/shadownode/ShadowNodeFamily.h @@ -11,6 +11,7 @@ #include #include +#include namespace facebook { namespace react { @@ -27,9 +28,7 @@ class ShadowNodeFamily { using Weak = std::weak_ptr; ShadowNodeFamily( - Tag tag, - SurfaceId surfaceId, - SharedEventEmitter const &eventEmitter, + ShadowNodeFamilyFragment const &fragment, ComponentDescriptor const &componentDescriptor); /*