From 61d2f1e6beb4f5b5f4b57c16b20081fbfe0bb264 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Tue, 30 Apr 2019 01:45:08 -0700 Subject: [PATCH] Display wrong view hierarchy in Test exceptions Summary: Trivial diff that adds extra logging information on Exceptions that are thrown by the FabricViewTest Reviewed By: shergin Differential Revision: D14817899 fbshipit-source-id: 32e1d1fcd1292715dfcf2750d3f14c668927c8b8 --- .../java/com/facebook/react/fabric/jsi/jni/Binding.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jsi/jni/Binding.cpp b/ReactAndroid/src/main/java/com/facebook/react/fabric/jsi/jni/Binding.cpp index dbf79b8928c..571e50073a6 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jsi/jni/Binding.cpp +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jsi/jni/Binding.cpp @@ -370,7 +370,7 @@ void Binding::schedulerDidFinishTransaction( JArrayClass::newArray(size); auto mountItems = *(mountItemsArray); - std::unordered_set deletedViews; + std::unordered_set deletedViewTags; int position = 0; for (const auto& mutation : mutations) { @@ -383,7 +383,7 @@ void Binding::schedulerDidFinishTransaction( switch (mutation.type) { case ShadowViewMutation::Create: { if (mutation.newChildShadowView.props->revision > 1 - || deletedViews.find(mutation.newChildShadowView.tag) != deletedViews.end()) { + || deletedViewTags.find(mutation.newChildShadowView.tag) != deletedViewTags.end()) { mountItems[position++] = createCreateMountItem(javaUIManager_, mutation, surfaceId); } @@ -400,7 +400,7 @@ void Binding::schedulerDidFinishTransaction( mountItems[position++] = createDeleteMountItem(javaUIManager_, mutation); - deletedViews.insert(mutation.oldChildShadowView.tag); + deletedViewTags.insert(mutation.oldChildShadowView.tag); break; } case ShadowViewMutation::Update: { @@ -444,7 +444,7 @@ void Binding::schedulerDidFinishTransaction( mountItems[position++] = createInsertMountItem(javaUIManager_, mutation); if (mutation.newChildShadowView.props->revision > 1 || - deletedViews.find(mutation.newChildShadowView.tag) != deletedViews.end()) { + deletedViewTags.find(mutation.newChildShadowView.tag) != deletedViewTags.end()) { mountItems[position++] = createUpdatePropsMountItem(javaUIManager_, mutation); }