diff options
author | Himself65 <himself65@outlook.com> | 2022-04-25 01:33:00 +0300 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2022-05-02 15:39:33 +0300 |
commit | 718d11fdb023668c80a8aaf5297556685f1f73d9 (patch) | |
tree | c50f0689d9ced0d26c9daaef53455d362fd0895b /lib | |
parent | 8e0e57666954874c9e263dce1b33c1634ccdbdda (diff) |
perf_hooks: return different functions in timerify
Fixes: https://github.com/nodejs/node/issues/42742
PR-URL: https://github.com/nodejs/node/pull/42854
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Co-authored-by: HE Shi-Jun <hax@heshijun.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/internal/perf/timerify.js | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/internal/perf/timerify.js b/lib/internal/perf/timerify.js index dae0b06bf80..6bfede7aa1f 100644 --- a/lib/internal/perf/timerify.js +++ b/lib/internal/perf/timerify.js @@ -6,7 +6,6 @@ const { MathCeil, ReflectApply, ReflectConstruct, - Symbol, } = primordials; const { InternalPerformanceEntry } = require('internal/perf/performance_entry'); @@ -35,8 +34,6 @@ const { enqueue, } = require('internal/perf/observe'); -const kTimerified = Symbol('kTimerified'); - function processComplete(name, start, args, histogram) { const duration = now() - start; if (histogram !== undefined) @@ -71,8 +68,6 @@ function timerify(fn, options = {}) { histogram); } - if (fn[kTimerified]) return fn[kTimerified]; - const constructor = isConstructor(fn); function timerified(...args) { @@ -95,11 +90,6 @@ function timerify(fn, options = {}) { } ObjectDefineProperties(timerified, { - [kTimerified]: { - configurable: false, - enumerable: false, - value: timerified, - }, length: { configurable: false, enumerable: true, @@ -112,14 +102,6 @@ function timerify(fn, options = {}) { } }); - ObjectDefineProperties(fn, { - [kTimerified]: { - configurable: false, - enumerable: false, - value: timerified, - } - }); - return timerified; } |