Fabric: More `assert`s in YogaLayoutableShadowNode
Summary: These `assert`s must be satisfied. Having them allows us to fail early in case of bugs. I spent a log of time debugging an issue and finally found that after adding those `assert`s. Changelog: [Internal] Fabric-specific internal change. Reviewed By: mdvacca Differential Revision: D20268046 fbshipit-source-id: 1d8ddd6de00069bd2a79e74af5e4278aa6c9131b
This commit is contained in:
Родитель
b5aaa25b9e
Коммит
2508c46a75
|
@ -261,11 +261,15 @@ void YogaLayoutableShadowNode::layoutTree(
|
|||
}
|
||||
|
||||
void YogaLayoutableShadowNode::layoutChildren(LayoutContext layoutContext) {
|
||||
assert(!yogaNode_.isDirty());
|
||||
|
||||
for (const auto &childYogaNode : yogaNode_.getChildren()) {
|
||||
if (!childYogaNode->getHasNewLayout()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
assert(!childYogaNode->isDirty());
|
||||
|
||||
auto childNode =
|
||||
static_cast<YogaLayoutableShadowNode *>(childYogaNode->getContext());
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче