* Tries to find a node with the specified path. * * @param {string[]} labels The path. * @param {function(CallTreeNode)} opt_f Visitor function.
(labels, opt_f)
| 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 | |
| 1270 | export function JsonProfile(useBigIntAddresses=false) { |
no test coverage detected