MCPcopy
hub / github.com/webpack/webpack / _startProcessing

Method _startProcessing

lib/util/AsyncQueue.js:359–380  ·  view source on GitHub ↗

* Processes the provided entry. * @param {AsyncQueueEntry<T, K, R>} entry the entry * @returns {void}

(entry)

Source from the content-addressed store, hash-verified

357 * @returns {void}
358 */
359 _startProcessing(entry) {
360 this.hooks.beforeStart.callAsync(entry.item, (err) => {
361 if (err) {
362 this._handleResult(
363 entry,
364 makeWebpackError(err, `AsyncQueue(${this._name}).hooks.beforeStart`)
365 );
366 return;
367 }
368 let inCallback = false;
369 try {
370 this._processor(entry.item, (e, r) => {
371 inCallback = true;
372 this._handleResult(entry, e, r);
373 });
374 } catch (err) {
375 if (inCallback) throw err;
376 this._handleResult(entry, /** @type {WebpackError} */ (err), null);
377 }
378 this.hooks.started.call(entry.item);
379 });
380 }
381
382 /**
383 * Processes the provided entry.

Callers 1

_ensureProcessingMethod · 0.95

Calls 3

_handleResultMethod · 0.95
makeWebpackErrorFunction · 0.85
callMethod · 0.45

Tested by

no test coverage detected