MCPcopy Create free account
hub / github.com/RisingStack/trace-nodejs / forEachTree

Function forEachTree

lib/agent/tracer/cache.js:28–40  ·  view source on GitHub ↗
(node, f)

Source from the content-addressed store, hash-verified

26}
27
28function forEachTree (node, f) {
29 var top
30 var st = [node]
31 while (st.length) {
32 top = st.shift()
33 if (top.d) { f(top) }
34 if (top.c) {
35 for (var c in top.c) {
36 st.unshift(top.c[c])
37 }
38 }
39 }
40}
41
42/*
43 Increments lock count by 1 for every node in the given ancestry path.

Callers 1

cache.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected