()
| 126 | changeRootAttachment(root, parent.owner) |
| 127 | |
| 128 | const onParentCleanup = () => { |
| 129 | const newParent = findClosestAliveParent(root) |
| 130 | changeRootAttachment(root, newParent.owner) |
| 131 | // still a sub-root |
| 132 | if (newParent.owner) { |
| 133 | parent = newParent |
| 134 | onOwnerCleanup(parent.root, onParentCleanup) |
| 135 | } |
| 136 | // becomes a root |
| 137 | else { |
| 138 | removeOwnCleanup() |
| 139 | createTopRoot(root) |
| 140 | } |
| 141 | } |
| 142 | const removeParentCleanup = onOwnerCleanup(parent.root, onParentCleanup) |
| 143 | const removeOwnCleanup = onOwnerCleanup(root, removeParentCleanup) |
| 144 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…