Skip to content

Commit afd722e

Browse files
committed
polish: remove misleading comment
We could not demonstrate via actual benchmarking that the tick reduction from awaiting a promise prior to returning it translates into real-world performance gains. See #3796. In any case, the promise must be awaited (irrespective of performance) to allow the catch block to handle rejection errors. Simply returning `completed` would result in test failures.
1 parent 1bf71ee commit afd722e

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/execution/execute.ts

-2
Original file line numberDiff line numberDiff line change
@@ -933,8 +933,6 @@ async function completePromisedValue(
933933
asyncPayloadRecord,
934934
);
935935
if (isPromise(completed)) {
936-
// see: https://github.com/tc39/proposal-faster-promise-adoption
937-
// it is faster to await a promise prior to returning it from an async function
938936
completed = await completed;
939937
}
940938
return completed;

0 commit comments

Comments
 (0)