Uh oh!
There was an error while loading. Please reload this page.
lib: make primordials Promise static methods safe - #38843
Conversation
Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1035/ Results |
BridgeAR
left a comment
There was a problem hiding this comment.
I am against changing further code to use primordials as outlined here #30697 (comment).
aduh95
commented
Jun 11, 2021
Note that this change removes the |
targos
commented
Jun 12, 2021
I'm generally uncomfortable about reimplementing standard methods to avoid the fact that they call user-mutable things. |
aduh95
commented
Jul 10, 2022
Superseded by #43728. |
Promise static methods that iterate over the provided argument (
%Promise.all%,%Promise.any%, ...) look up thethenproperty over each promise to support promise subclassing. This PR is introducingSafePromiseAll,SafePromiseAny, etc. that take a array, safely iterate over it, and wrap each promise in aSafePromisewhose prototype is accessible from userland.