| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1e8fa2f commit 450e051
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,6 +11,7 @@ const { | |||
| 11 | 11 | MathMax, | |
| 12 | 12 | NumberIsNaN, | |
| 13 | 13 | PromisePrototypeThen, | |
| 14 | + ReflectApply, | ||
| 14 | 15 | ReflectGet, | |
| 15 | 16 | Symbol, | |
| 16 | 17 | SymbolAsyncIterator, | |
@@ -166,15 +167,9 @@ function enqueueValueWithSize(controller, value, size) { | |||
| 166 | 167 | controller[kState].queueTotalSize += size; | |
| 167 | 168 | } | |
| 168 | 169 | ||
| 169 | - // This implements "invoke a callback function type" for callback functions that return a promise. | ||
| 170 | - // See https://webidl.spec.whatwg.org/#es-invoking-callback-functions | ||
| 171 | - async function invokePromiseCallback(fn, thisArg, ...args) { | ||
| 172 | - return FunctionPrototypeCall(fn, thisArg, ...args); | ||
| 173 | - } | ||
| 174 | - | ||
| 175 | 170 | function createPromiseCallback(name, fn, thisArg) { | |
| 176 | 171 | validateFunction(fn, name); | |
| 177 | - return (...args) => invokePromiseCallback(fn, thisArg, ...args); | ||
| 172 | + return async (...args) => ReflectApply(fn, thisArg, args); | ||
| 178 | 173 | } | |
| 179 | 174 | ||
| 180 | 175 | function isPromisePending(promise) { | |
@@ -281,7 +276,6 @@ module.exports = { | |||
| 281 | 276 | extractHighWaterMark, | |
| 282 | 277 | extractSizeAlgorithm, | |
| 283 | 278 | lazyTransfer, | |
| 284 | - invokePromiseCallback, | ||
| 285 | 279 | isBrandCheck, | |
| 286 | 280 | isPromisePending, | |
| 287 | 281 | peekQueueValue, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments