(promises, fn, initialValue, _each)
| 8252 | var tryCatch = util.tryCatch; |
| 8253 | |
| 8254 | function ReductionPromiseArray(promises, fn, initialValue, _each) { |
| 8255 | this.constructor$(promises); |
| 8256 | var domain = getDomain(); |
| 8257 | this._fn = domain === null ? fn : util.domainBind(domain, fn); |
| 8258 | if (initialValue !== undefined) { |
| 8259 | initialValue = Promise.resolve(initialValue); |
| 8260 | initialValue._attachCancellationCallback(this); |
| 8261 | } |
| 8262 | this._initialValue = initialValue; |
| 8263 | this._currentCancellable = null; |
| 8264 | if(_each === INTERNAL) { |
| 8265 | this._eachValues = Array(this._length); |
| 8266 | } else if (_each === 0) { |
| 8267 | this._eachValues = null; |
| 8268 | } else { |
| 8269 | this._eachValues = undefined; |
| 8270 | } |
| 8271 | this._promise._captureStackTrace(); |
| 8272 | this._init$(undefined, -5); |
| 8273 | } |
| 8274 | util.inherits(ReductionPromiseArray, PromiseArray); |
| 8275 | |
| 8276 | ReductionPromiseArray.prototype._gotAccum = function(accum) { |
nothing calls this directly
no outgoing calls
no test coverage detected