MCPcopy
hub / github.com/di-sukharev/opencommit / SetUpReadableStreamDefaultController

Function SetUpReadableStreamDefaultController

out/cli.cjs:13409–13432  ·  view source on GitHub ↗
(stream4, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm)

Source from the content-addressed store, hash-verified

13407 return false;
13408 }
13409 function SetUpReadableStreamDefaultController(stream4, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm) {
13410 controller._controlledReadableStream = stream4;
13411 controller._queue = void 0;
13412 controller._queueTotalSize = void 0;
13413 ResetQueue(controller);
13414 controller._started = false;
13415 controller._closeRequested = false;
13416 controller._pullAgain = false;
13417 controller._pulling = false;
13418 controller._strategySizeAlgorithm = sizeAlgorithm;
13419 controller._strategyHWM = highWaterMark;
13420 controller._pullAlgorithm = pullAlgorithm;
13421 controller._cancelAlgorithm = cancelAlgorithm;
13422 stream4._readableStreamController = controller;
13423 const startResult = startAlgorithm();
13424 uponPromise(promiseResolvedWith(startResult), () => {
13425 controller._started = true;
13426 ReadableStreamDefaultControllerCallPullIfNeeded(controller);
13427 return null;
13428 }, (r3) => {
13429 ReadableStreamDefaultControllerError(controller, r3);
13430 return null;
13431 });
13432 }
13433 function SetUpReadableStreamDefaultControllerFromUnderlyingSource(stream4, underlyingSource, highWaterMark, sizeAlgorithm) {
13434 const controller = Object.create(ReadableStreamDefaultController2.prototype);
13435 let startAlgorithm;

Calls 6

ResetQueueFunction · 0.85
startAlgorithmFunction · 0.85
uponPromiseFunction · 0.85
promiseResolvedWithFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…