(mapResult, keyPrefix, mapFunction, mapContext)
| 19145 | var POOL_SIZE = 10; |
| 19146 | var traverseContextPool = []; |
| 19147 | function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) { |
| 19148 | if (traverseContextPool.length) { |
| 19149 | var traverseContext = traverseContextPool.pop(); |
| 19150 | traverseContext.result = mapResult; |
| 19151 | traverseContext.keyPrefix = keyPrefix; |
| 19152 | traverseContext.func = mapFunction; |
| 19153 | traverseContext.context = mapContext; |
| 19154 | traverseContext.count = 0; |
| 19155 | return traverseContext; |
| 19156 | } else { |
| 19157 | return { |
| 19158 | result: mapResult, |
| 19159 | keyPrefix: keyPrefix, |
| 19160 | func: mapFunction, |
| 19161 | context: mapContext, |
| 19162 | count: 0 |
| 19163 | }; |
| 19164 | } |
| 19165 | } |
| 19166 | |
| 19167 | function releaseTraverseContext(traverseContext) { |
| 19168 | traverseContext.result = null; |
no outgoing calls
no test coverage detected