MCPcopy Create free account
hub / github.com/TruthHun/BookStack / PromiseSpawn

Function PromiseSpawn

static/word2md/mammoth.browser.js:6014–6036  ·  view source on GitHub ↗
(generatorFunction, receiver, yieldHandler, stack)

Source from the content-addressed store, hash-verified

6012}
6013
6014function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) {
6015 if (debug.cancellation()) {
6016 var internal = new Promise(INTERNAL);
6017 var _finallyPromise = this._finallyPromise = new Promise(INTERNAL);
6018 this._promise = internal.lastly(function() {
6019 return _finallyPromise;
6020 });
6021 internal._captureStackTrace();
6022 internal._setOnCancel(this);
6023 } else {
6024 var promise = this._promise = new Promise(INTERNAL);
6025 promise._captureStackTrace();
6026 }
6027 this._stack = stack;
6028 this._generatorFunction = generatorFunction;
6029 this._receiver = receiver;
6030 this._generator = undefined;
6031 this._yieldHandlers = typeof yieldHandler === "function"
6032 ? [yieldHandler].concat(yieldHandlers)
6033 : yieldHandlers;
6034 this._yieldedPromise = null;
6035 this._cancellationPhase = false;
6036}
6037util.inherits(PromiseSpawn, Proxyable);
6038
6039PromiseSpawn.prototype._isResolved = function() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected