remove uses of ShadowNode::Shared from ShadowNode.cpp (#52422)

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

changelog: [internal]

In https://github.com/facebook/react-native/pull/52393 not all uses of ShadowNode::Shared were removed. Github CI fails if a deprecated API is used. Let's remove the last uses.

Reviewed By: cortinico

Differential Revision: D77790411

fbshipit-source-id: 6fbbbffaa784de1f0939d1032dc7ea6586f2ce7d
This commit is contained in:
Samuel Susla
2025-07-04 04:49:12 -07:00
committed by Facebook GitHub Bot
parent b4dcc9831e
commit bc4bce61df
@@ -330,14 +330,14 @@ void ShadowNode::setRuntimeShadowNodeReference(
}
void ShadowNode::updateRuntimeShadowNodeReference(
const Shared& destinationShadowNode) const {
const std::shared_ptr<const ShadowNode>& destinationShadowNode) const {
if (auto reference = runtimeShadowNodeReference_.lock()) {
reference->shadowNode = destinationShadowNode;
}
}
void ShadowNode::transferRuntimeShadowNodeReference(
const Shared& destinationShadowNode) const {
const std::shared_ptr<const ShadowNode>& destinationShadowNode) const {
destinationShadowNode->runtimeShadowNodeReference_ =
runtimeShadowNodeReference_;
@@ -347,7 +347,7 @@ void ShadowNode::transferRuntimeShadowNodeReference(
}
void ShadowNode::transferRuntimeShadowNodeReference(
const Shared& destinationShadowNode,
const std::shared_ptr<const ShadowNode>& destinationShadowNode,
const ShadowNodeFragment& fragment) const {
if ((ReactNativeFeatureFlags::updateRuntimeShadowNodeReferencesOnCommit() ||
useRuntimeShadowNodeReferenceUpdateOnThread) &&