mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
StubViewTree: log more information before UPDATE assertion failure
Summary: Log more diagnostics about this assertion failure. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D27407775 fbshipit-source-id: 7f00215b8b2c0ad7378c5671f3b503daf56b9fd2
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d1f09f7390
commit
2aee39cdc1
@@ -151,6 +151,11 @@ void StubViewTree::mutate(ShadowViewMutationList const &mutations) {
|
||||
registry.find(mutation.newChildShadowView.tag) != registry.end());
|
||||
auto oldStubView = registry[mutation.newChildShadowView.tag];
|
||||
react_native_assert(oldStubView->tag != 0);
|
||||
if ((ShadowView)(*oldStubView) != mutation.oldChildShadowView) {
|
||||
LOG(ERROR)
|
||||
<< "UPDATE mutation assertion failure: oldChildShadowView doesn't match oldStubView: ["
|
||||
<< mutation.oldChildShadowView.tag << "]";
|
||||
}
|
||||
react_native_assert(
|
||||
(ShadowView)(*oldStubView) == mutation.oldChildShadowView);
|
||||
oldStubView->update(mutation.newChildShadowView);
|
||||
|
||||
Reference in New Issue
Block a user