mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
transformStreamDefaultControllerPerformTransform chained a rejection step onto the result of every transform() call. A non-thenable result cannot reject, so return the shared resolved promise directly and save a promise allocation and a microtask per chunk. The write promise of a transform whose transform() returns a non-thenable now settles one microtask earlier than in the reference implementation. The relative order of all stream events is unchanged. Signed-off-by: Matteo Collina <hello@matteocollina.com> PR-URL: https://github.com/nodejs/node/pull/67339 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: James M Snell <jasnell@gmail.com>