(mapResult, keyPrefix, mapFunction, mapContext)
| 18240 | var POOL_SIZE = 10; |
| 18241 | var traverseContextPool = []; |
| 18242 | function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) { |
| 18243 | if (traverseContextPool.length) { |
| 18244 | var traverseContext = traverseContextPool.pop(); |
| 18245 | traverseContext.result = mapResult; |
| 18246 | traverseContext.keyPrefix = keyPrefix; |
| 18247 | traverseContext.func = mapFunction; |
| 18248 | traverseContext.context = mapContext; |
| 18249 | traverseContext.count = 0; |
| 18250 | return traverseContext; |
| 18251 | } else { |
| 18252 | return { |
| 18253 | result: mapResult, |
| 18254 | keyPrefix: keyPrefix, |
| 18255 | func: mapFunction, |
| 18256 | context: mapContext, |
| 18257 | count: 0 |
| 18258 | }; |
| 18259 | } |
| 18260 | } |
| 18261 | |
| 18262 | function releaseTraverseContext(traverseContext) { |
| 18263 | traverseContext.result = null; |
no outgoing calls
no test coverage detected