@@ -85,25 +85,8 @@ void StubViewTree::mutate(const ShadowViewMutationList& mutations) {
8585 auto tag = mutation.oldChildShadowView .tag ;
8686 react_native_assert (hasTag (tag));
8787 auto stubView = registry_[tag];
88- if ((ShadowView)(*stubView) != mutation.oldChildShadowView ) {
89- LOG (ERROR )
90- << " StubView: ASSERT FAILURE: DELETE mutation assertion failure: oldChildShadowView does not match stubView: ["
91- << mutation.oldChildShadowView .tag << " ] stub hash: ##"
92- << std::hash<ShadowView>{}((ShadowView)*stubView)
93- << " old mutation hash: ##"
94- << std::hash<ShadowView>{}(mutation.oldChildShadowView );
95- #if RN_DEBUG_STRING_CONVERTIBLE
96- LOG (ERROR ) << " StubView: "
97- << getDebugPropsDescription ((ShadowView)*stubView, {});
98- LOG (ERROR ) << " OldChildShadowView: "
99- << getDebugPropsDescription (
100- mutation.oldChildShadowView , {});
101- #endif
102- }
103- react_native_assert (
104- (ShadowView)(*stubView) == mutation.oldChildShadowView );
105- registry_.erase (tag);
10688
89+ registry_.erase (tag);
10790 recordMutation (mutation);
10891
10992 break ;
@@ -177,25 +160,8 @@ void StubViewTree::mutate(const ShadowViewMutationList& mutations) {
177160 static_cast <size_t >(mutation.index ));
178161 react_native_assert (hasTag (childTag));
179162 auto childStubView = registry_[childTag];
180- if ((ShadowView)(*childStubView) != mutation.oldChildShadowView ) {
181- LOG (ERROR )
182- << " StubView: ASSERT FAILURE: REMOVE mutation assertion failure: oldChildShadowView does not match oldStubView: ["
183- << mutation.oldChildShadowView .tag << " ] stub hash: ##"
184- << std::hash<ShadowView>{}((ShadowView)*childStubView)
185- << " old mutation hash: ##"
186- << std::hash<ShadowView>{}(mutation.oldChildShadowView );
187- #if RN_DEBUG_STRING_CONVERTIBLE
188- LOG (ERROR ) << " ChildStubView: "
189- << getDebugPropsDescription (
190- (ShadowView)*childStubView, {});
191- LOG (ERROR ) << " OldChildShadowView: "
192- << getDebugPropsDescription (
193- mutation.oldChildShadowView , {});
194- #endif
195- }
196- react_native_assert (
197- (ShadowView)(*childStubView) == mutation.oldChildShadowView );
198163 react_native_assert (childStubView->parentTag == parentTag);
164+
199165 STUB_VIEW_LOG ({
200166 std::string strChildList = " " ;
201167 int i = 0 ;
@@ -245,23 +211,7 @@ void StubViewTree::mutate(const ShadowViewMutationList& mutations) {
245211 react_native_assert (hasTag (mutation.parentTag ));
246212 react_native_assert (oldStubView->parentTag == mutation.parentTag );
247213 }
248- if ((ShadowView)(*oldStubView) != mutation.oldChildShadowView ) {
249- LOG (ERROR )
250- << " StubView: ASSERT FAILURE: UPDATE mutation assertion failure: oldChildShadowView does not match oldStubView: ["
251- << mutation.oldChildShadowView .tag << " ] old stub hash: ##"
252- << std::hash<ShadowView>{}((ShadowView)*oldStubView)
253- << " old mutation hash: ##"
254- << std::hash<ShadowView>{}(mutation.oldChildShadowView );
255- #if RN_DEBUG_STRING_CONVERTIBLE
256- LOG (ERROR ) << " OldStubView: "
257- << getDebugPropsDescription ((ShadowView)*oldStubView, {});
258- LOG (ERROR ) << " OldChildShadowView: "
259- << getDebugPropsDescription (
260- mutation.oldChildShadowView , {});
261- #endif
262- }
263- react_native_assert (
264- (ShadowView)(*oldStubView) == mutation.oldChildShadowView );
214+
265215 oldStubView->update (mutation.newChildShadowView );
266216
267217 // Hash for stub view and the ShadowView should be identical - this
0 commit comments