StubViewTree: reenable asserts in Delete mutation path

Summary:
I had intended to make this change as part of the stack I landed earlier, but I had some poorly resolved merge conflicts that left this path disabled.

I verified that T76057501 no longer repros and ran unit tests.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D27788467

fbshipit-source-id: 42148b887c6b3c0e815f1805e6bfb3ee58503e48
This commit is contained in:
Joshua Gross
2021-04-15 11:22:19 -07:00
committed by Facebook GitHub Bot
parent e6dc3717e9
commit bd1d4e9f4f
@@ -67,13 +67,11 @@ void StubViewTree::mutate(ShadowViewMutationList const &mutations) {
react_native_assert(mutation.parentShadowView == ShadowView{});
react_native_assert(mutation.newChildShadowView == ShadowView{});
auto tag = mutation.oldChildShadowView.tag;
/* Disable this assert until T76057501 is resolved.
react_native_assert(registry.find(tag) != registry.end());
auto stubView = registry[tag];
if ((ShadowView)(*stubView) != mutation.oldChildShadowView) {
LOG(ERROR)
<< "StubView: ASSERT FAILURE: DELETE mutation assertion failure:
oldChildShadowView does not match stubView: ["
<< "StubView: ASSERT FAILURE: DELETE mutation assertion failure: oldChildShadowView does not match stubView: ["
<< mutation.oldChildShadowView.tag << "] stub hash: ##"
<< std::hash<ShadowView>{}((ShadowView)*stubView)
<< " old mutation hash: ##"
@@ -88,7 +86,6 @@ oldChildShadowView does not match stubView: ["
}
react_native_assert(
(ShadowView)(*stubView) == mutation.oldChildShadowView);
*/
registry.erase(tag);
break;
}