[yoga re-add assertion to check for owner reference before adding child.

Reviewed By: emilsjolander

Differential Revision: D7495417

fbshipit-source-id: b81174aeea3f2796d76ccdae4a8eddd0beace0aa
This commit is contained in:
David Vacca 2018-04-04 10:30:16 -07:00 committed by Facebook Github Bot
parent 24f574032a
commit 3cd2b43426
1 changed files with 5 additions and 0 deletions

View File

@ -370,6 +370,11 @@ void YGConfigCopy(const YGConfigRef dest, const YGConfigRef src) {
}
void YGNodeInsertChild(const YGNodeRef node, const YGNodeRef child, const uint32_t index) {
YGAssertWithNode(
node,
child->getOwner() == nullptr,
"Child already has a owner, it must be removed first.");
YGAssertWithNode(
node,
node->getMeasure() == nullptr,