mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
perf_hooks: make Performance extend EventTarget
Refs: https://www.w3.org/TR/hr-time/#sec-performance PR-URL: https://github.com/nodejs/node/pull/37621 Backport-PR-URL: https://github.com/nodejs/node/pull/37832 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
d33f446abd
commit
e60bd1a7dc
2 files changed
+5
-4
No files matched your search
+5
-1
@@ -54,6 +54,9 @@ const {
|
||||
NODE_PERFORMANCE_MILESTONE_ENVIRONMENT
|
||||
} = constants;
|
||||
|
||||
const {
|
||||
EventTarget,
|
||||
} = require('internal/event_target');
|
||||
const L = require('internal/linkedlist');
|
||||
const kInspect = require('internal/util').customInspectSymbol;
|
||||
|
||||
@@ -418,8 +421,9 @@ class PerformanceObserver {
|
||||
}
|
||||
}
|
||||
|
||||
class Performance {
|
||||
class Performance extends EventTarget {
|
||||
constructor() {
|
||||
super();
|
||||
this[kIndex] = {
|
||||
[kMarks]: new SafeSet()
|
||||
};
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
{
|
||||
"basic.any.js": {
|
||||
"fail": "self.performance.addEventListener is not a function"
|
||||
},
|
||||
"idlharness.any.js": {
|
||||
"skip": "TODO: update IDL parser"
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user