From 7a609a2d5517c4b79c4e5102dcee018d7db4dfa6 Mon Sep 17 00:00:00 2001 From: Yaacov Rydzinski Date: Mon, 2 Jan 2023 16:42:42 +0200 Subject: [PATCH] polish: remove misleading comment (#3806) 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. --- src/execution/execute.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/execution/execute.ts b/src/execution/execute.ts index ffdb3f53c7..1bc6c4267b 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -942,8 +942,6 @@ async function completePromisedValue( asyncPayloadRecord, ); if (isPromise(completed)) { - // see: https://github.com/tc39/proposal-faster-promise-adoption - // it is faster to await a promise prior to returning it from an async function completed = await completed; } return completed;