diff --git a/lib/internal/webstreams/util.js b/lib/internal/webstreams/util.js index 9b87207b59428e..e862b3ffe25724 100644 --- a/lib/internal/webstreams/util.js +++ b/lib/internal/webstreams/util.js @@ -176,13 +176,13 @@ function enqueueValueWithSize(controller, value, size) { // This implements "invoke a callback function type" for callback functions that return a promise. // See https://webidl.spec.whatwg.org/#es-invoking-callback-functions -async function ensureIsPromise(fn, thisArg, ...args) { +async function invokePromiseCallback(fn, thisArg, ...args) { return FunctionPrototypeCall(fn, thisArg, ...args); } function createPromiseCallback(name, fn, thisArg) { validateFunction(fn, name); - return (...args) => ensureIsPromise(fn, thisArg, ...args); + return (...args) => invokePromiseCallback(fn, thisArg, ...args); } function isPromisePending(promise) { @@ -274,11 +274,11 @@ module.exports = { copyArrayBuffer, customInspect, dequeueValue, - ensureIsPromise, enqueueValueWithSize, extractHighWaterMark, extractSizeAlgorithm, lazyTransfer, + invokePromiseCallback, isBrandCheck, isPromisePending, isViewedArrayBufferDetached,