From 4ebb57b0bae83dadf07a5fe9ce528796b1bb35b5 Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Tue, 10 Apr 2018 12:45:28 -0700 Subject: [PATCH] Fabric: `ShadowNode.revision_` field is now private Summary: It prevents accidental access to the variable. Reviewed By: fkgozali Differential Revision: D7467789 fbshipit-source-id: fa026734f58f0039e9b6d401751e022a9ae2431d --- ReactCommon/fabric/core/shadownode/ShadowNode.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ReactCommon/fabric/core/shadownode/ShadowNode.h b/ReactCommon/fabric/core/shadownode/ShadowNode.h index 4045be846..2efadda40 100644 --- a/ReactCommon/fabric/core/shadownode/ShadowNode.h +++ b/ReactCommon/fabric/core/shadownode/ShadowNode.h @@ -81,7 +81,15 @@ protected: SharedProps props_; SharedShadowNodeSharedList children_; WeakShadowNode sourceNode_; - int revision_; + +private: + + /* + * A number of the generation of the ShadowNode instance; + * is used and useful for debug-printing purposes *only*. + * Do not access this value in any circumstances. + */ + const int revision_; }; } // namespace react