diff --git a/lib/perf_hooks.js b/lib/perf_hooks.js index d822c5de71bd46..e0b7e9d960e0ec 100644 --- a/lib/perf_hooks.js +++ b/lib/perf_hooks.js @@ -149,7 +149,7 @@ function getMilestoneTimestamp(milestoneIdx) { return ns / 1e6 - timeOrigin; } -class PerformanceNodeTiming { +class PerformanceNodeTiming extends PerformanceEntry { get name() { return 'node'; } @@ -213,9 +213,6 @@ class PerformanceNodeTiming { }; } } -Object.setPrototypeOf( - PerformanceNodeTiming.prototype, PerformanceEntry.prototype); -Object.setPrototypeOf(PerformanceNodeTiming, PerformanceEntry); const nodeTiming = new PerformanceNodeTiming();