Skip to content

perf_hooks: fix function wrapped by performance.timerify to work correctly

Rodrigo Muino Tomonari requested to merge github/fork/cola119/issue-40623 into master

Fixed #40623 (closed) (#40625 also fixes this issue but it has been stale and seems not expected to be updated.)

This issue introduced by the refactoring on #37136. The previous implementation was checking whether a function or class is called using the new operator to proxy a function call.

https://github.com/nodejs/node/blob/74227bbc4aa3da2446d5d8398081f3225dd68b64/src/node_perf.cc#L380-L393

This PR fixed to align with the previous behavior that a function works the same as if it was called directly.

Merge request reports

Loading