ShadowNodeFamily now accepts fragment in constructor

Summary:
`ShadowNodeFamily` now accepts ShadowNodeFamilyfragment as its constructor parameter.

Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D19115794

fbshipit-source-id: 95605398a8f6b54b5c6f196a22b8b6cadb18baad
This commit is contained in:
Samuel Susla
2019-12-19 13:45:35 -08:00
committed by Facebook Github Bot
parent bd359ce257
commit bc9d50991a
3 changed files with 9 additions and 12 deletions
@@ -45,9 +45,9 @@ ShadowNode::ShadowNode(
: emptySharedShadowNodeSharedList()),
state_(fragment.state),
family_(std::make_shared<ShadowNodeFamily const>(
fragment.tag,
fragment.surfaceId,
fragment.eventEmitter,
ShadowNodeFamilyFragment{fragment.tag,
fragment.surfaceId,
fragment.eventEmitter},
componentDescriptor)),
traits_(traits) {
assert(props_);
@@ -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()) {}
@@ -11,6 +11,7 @@
#include <react/core/EventEmitter.h>
#include <react/core/ReactPrimitives.h>
#include <react/core/ShadowNodeFamilyFragment.h>
namespace facebook {
namespace react {
@@ -27,9 +28,7 @@ class ShadowNodeFamily {
using Weak = std::weak_ptr<ShadowNodeFamily const>;
ShadowNodeFamily(
Tag tag,
SurfaceId surfaceId,
SharedEventEmitter const &eventEmitter,
ShadowNodeFamilyFragment const &fragment,
ComponentDescriptor const &componentDescriptor);
/*