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
This commit is contained in:
David Vacca 2019-04-30 01:45:08 -07:00 коммит произвёл Facebook Github Bot
Родитель f98880b1a3
Коммит 61d2f1e6be
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -370,7 +370,7 @@ void Binding::schedulerDidFinishTransaction(
JArrayClass<JMountItem::javaobject>::newArray(size);
auto mountItems = *(mountItemsArray);
std::unordered_set<Tag> deletedViews;
std::unordered_set<Tag> 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);
}