(mapResult, keyPrefix, mapFunction, mapContext)
| 18368 | var POOL_SIZE = 10; |
| 18369 | var traverseContextPool = []; |
| 18370 | function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) { |
| 18371 | if (traverseContextPool.length) { |
| 18372 | var traverseContext = traverseContextPool.pop(); |
| 18373 | traverseContext.result = mapResult; |
| 18374 | traverseContext.keyPrefix = keyPrefix; |
| 18375 | traverseContext.func = mapFunction; |
| 18376 | traverseContext.context = mapContext; |
| 18377 | traverseContext.count = 0; |
| 18378 | return traverseContext; |
| 18379 | } else { |
| 18380 | return { |
| 18381 | result: mapResult, |
| 18382 | keyPrefix: keyPrefix, |
| 18383 | func: mapFunction, |
| 18384 | context: mapContext, |
| 18385 | count: 0 |
| 18386 | }; |
| 18387 | } |
| 18388 | } |
| 18389 | |
| 18390 | function releaseTraverseContext(traverseContext) { |
| 18391 | traverseContext.result = null; |
no outgoing calls
no test coverage detected