MCPcopy Index your code
hub / github.com/nodejs/node / descendToChild

Method descendToChild

deps/v8/tools/profile.mjs:1257–1267  ·  view source on GitHub ↗

* Tries to find a node with the specified path. * * @param {string[]} labels The path. * @param {function(CallTreeNode)} opt_f Visitor function.

(labels, opt_f)

Source from the content-addressed store, hash-verified

1255 * @param {function(CallTreeNode)} opt_f Visitor function.
1256 */
1257 descendToChild(labels, opt_f) {
1258 let curr = this;
1259 for (let pos = 0; pos < labels.length && curr != null; pos++) {
1260 const child = curr.findChild(labels[pos]);
1261 if (opt_f) {
1262 opt_f(child, pos);
1263 }
1264 curr = child;
1265 }
1266 return curr;
1267 }
1268}
1269
1270export function JsonProfile(useBigIntAddresses=false) {

Callers 3

assertPathExistsFunction · 0.80
assertNoPathExistsFunction · 0.80
assertNodeWeightsFunction · 0.80

Calls 1

findChildMethod · 0.80

Tested by

no test coverage detected