MCPcopy Create free account
hub / github.com/thetarnav/solid-devtools / onParentCleanup

Function onParentCleanup

packages/debugger/src/main/roots.ts:128–141  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 }

Callers

nothing calls this directly

Calls 4

onOwnerCleanupFunction · 0.90
findClosestAliveParentFunction · 0.85
changeRootAttachmentFunction · 0.85
createTopRootFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…