From bd1d4e9f4fa7aae86cb4aa90a9629d3ec8ed6a68 Mon Sep 17 00:00:00 2001 From: Joshua Gross Date: Thu, 15 Apr 2021 11:20:43 -0700 Subject: [PATCH] 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 --- ReactCommon/react/renderer/mounting/StubViewTree.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ReactCommon/react/renderer/mounting/StubViewTree.cpp b/ReactCommon/react/renderer/mounting/StubViewTree.cpp index ee1c9940377..5a9143faee1 100644 --- a/ReactCommon/react/renderer/mounting/StubViewTree.cpp +++ b/ReactCommon/react/renderer/mounting/StubViewTree.cpp @@ -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)*stubView) << " old mutation hash: ##" @@ -88,7 +86,6 @@ oldChildShadowView does not match stubView: [" } react_native_assert( (ShadowView)(*stubView) == mutation.oldChildShadowView); - */ registry.erase(tag); break; }