delete ShadowNodeFragment::Value (#43962)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43962

changelog: [internal]

Not used, let's delete it.

Reviewed By: fabriziocucci

Differential Revision: D55689099

fbshipit-source-id: 37751aad8119a7421fc5f2f78230540da4a244ea
This commit is contained in:
Samuel Susla
2024-04-08 06:43:48 -07:00
committed by Facebook GitHub Bot
parent b069fca5c5
commit 88b6e11508
2 changed files with 0 additions and 35 deletions
@@ -31,15 +31,4 @@ const State::Shared& ShadowNodeFragment::statePlaceholder() {
return instance;
}
using Value = ShadowNodeFragment::Value;
Value::Value(const ShadowNodeFragment& fragment)
: props(fragment.props),
children(fragment.children),
state(fragment.state) {}
Value::operator ShadowNodeFragment() const {
return ShadowNodeFragment{props, children, state};
}
} // namespace facebook::react
@@ -21,8 +21,6 @@ namespace facebook::react {
* Note: Most of the fields are `const &` references (essentially just raw
* pointers) which means that the Fragment does not copy/store them nor
* retain ownership of them.
* Use `ShadowNodeFragment::Value` (see below) to create an owning copy of the
* fragment content to store or pass the data asynchronously.
*/
struct ShadowNodeFragment {
const Props::Shared& props = propsPlaceholder();
@@ -37,28 +35,6 @@ struct ShadowNodeFragment {
static const Props::Shared& propsPlaceholder();
static const ShadowNode::SharedListOfShared& childrenPlaceholder();
static const State::Shared& statePlaceholder();
/*
* `ShadowNodeFragment` is not owning data-structure, it only stores raw
* pointers to the data. `ShadowNodeFragment::Value` is a convenient owning
* counterpart of that.
*/
class Value final {
public:
/*
* Creates an object with given `ShadowNodeFragment`.
*/
Value(const ShadowNodeFragment& fragment);
/*
* Creates a `ShadowNodeFragment` from the object.
*/
explicit operator ShadowNodeFragment() const;
Props::Shared props;
ShadowNode::SharedListOfShared children;
State::Shared state;
};
};
} // namespace facebook::react