From b1d646a7cd6757391aa58045990cf3516b77ad50 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Wed, 16 May 2018 17:57:27 -0700 Subject: [PATCH] Add extra logging information for ReactShadowNode Reviewed By: achen1 Differential Revision: D8020040 fbshipit-source-id: c0606eeeb14e89e52f2a0b5537418d88387e4e0a --- .../com/facebook/react/uimanager/ReactShadowNodeImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNodeImpl.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNodeImpl.java index ff009b5b2..a6c152066 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNodeImpl.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNodeImpl.java @@ -110,6 +110,7 @@ public class ReactShadowNodeImpl implements ReactShadowNode private final float[] mPadding = new float[Spacing.ALL + 1]; private final boolean[] mPaddingIsPercent = new boolean[Spacing.ALL + 1]; private YogaNode mYogaNode; + private int mGenerationDebugInformation = 1; private ReactShadowNode mOriginalReactShadowNode = null; private @Nullable ReactStylesDiffMap mNewProps; @@ -143,6 +144,7 @@ public class ReactShadowNodeImpl implements ReactShadowNode mScreenY = 0; mScreenWidth = 0; mScreenHeight = 0; + mGenerationDebugInformation = original.mGenerationDebugInformation + 1; arraycopy(original.mPadding, 0, mPadding, 0, original.mPadding.length); arraycopy(original.mPaddingIsPercent, 0, mPaddingIsPercent, 0, original.mPaddingIsPercent.length); mNewProps = null; @@ -1062,8 +1064,8 @@ public class ReactShadowNodeImpl implements ReactShadowNode result.append(" "); } - result.append("<").append(getClass().getSimpleName()).append(" tag=").append(getReactTag()).append(" hash=") - .append(hashCode()); + result.append("<").append(getClass().getSimpleName()).append(" tag=").append(getReactTag()).append(" gen=") + .append(mGenerationDebugInformation); if (mYogaNode != null) { result.append(" layout='x:").append(getScreenX()) .append(" y:").append(getScreenY()).append(" w:").append(getLayoutWidth()).append(" h:")