Skip to content

Commit

Permalink
Fabric: Using RootShadowNode instead of ShadowNode in ShadowTreeRevision
Browse files Browse the repository at this point in the history
Summary:
It's more correct and we will rely on this in the future.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: JoshuaGross

Differential Revision: D23681508

fbshipit-source-id: 5fef0ea164e8a400e6ca9a67947252b47ce6d44e
  • Loading branch information
shergin authored and facebook-github-bot committed Sep 14, 2020
1 parent fbfadc2 commit 135993b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ReactCommon/react/renderer/mounting/ShadowTreeRevision.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace react {
using Number = ShadowTreeRevision::Number;

ShadowTreeRevision::ShadowTreeRevision(
ShadowNode::Shared const &rootShadowNode,
RootShadowNode::Shared const &rootShadowNode,
Number number,
TransactionTelemetry telemetry)
: rootShadowNode_(rootShadowNode), number_(number), telemetry_(telemetry) {}
Expand All @@ -22,7 +22,7 @@ TransactionTelemetry const &ShadowTreeRevision::getTelemetry() const {
return telemetry_;
}

ShadowNode const &ShadowTreeRevision::getRootShadowNode() {
RootShadowNode const &ShadowTreeRevision::getRootShadowNode() {
return *rootShadowNode_;
}

Expand Down
7 changes: 4 additions & 3 deletions ReactCommon/react/renderer/mounting/ShadowTreeRevision.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include <better/optional.h>

#include <react/renderer/components/root/RootShadowNode.h>
#include <react/renderer/mounting/MountingOverrideDelegate.h>
#include <react/renderer/mounting/MountingTransaction.h>
#include <react/renderer/mounting/ShadowViewMutation.h>
Expand All @@ -34,7 +35,7 @@ class ShadowTreeRevision final {
* telemetry.
*/
ShadowTreeRevision(
ShadowNode::Shared const &rootShadowNode,
RootShadowNode::Shared const &rootShadowNode,
Number number,
TransactionTelemetry telemetry);

Expand All @@ -48,7 +49,7 @@ class ShadowTreeRevision final {
* `MountingOverrideDelegate` only.
*/
public:
ShadowNode const &getRootShadowNode();
RootShadowNode const &getRootShadowNode();

/*
* Methods from this section are meant to be used by `MountingCoordinator`
Expand All @@ -60,7 +61,7 @@ class ShadowTreeRevision final {
Number getNumber() const;

private:
ShadowNode::Shared rootShadowNode_;
RootShadowNode::Shared rootShadowNode_;
Number number_;
TransactionTelemetry telemetry_;
};
Expand Down

0 comments on commit 135993b

Please sign in to comment.