Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/perf_hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ const {
constants,
} = internalBinding('performance');

const {
EventTarget,
} = require('internal/event_target');

const {
PerformanceEntry,
now,
Expand All @@ -36,7 +40,7 @@ const timerify = require('internal/perf/timerify');
const { customInspectSymbol: kInspect } = require('internal/util');
const { inspect } = require('util');

class Performance {
class Performance extends EventTarget {
constructor() {
// eslint-disable-next-line no-restricted-syntax
throw new TypeError('Illegal constructor');
Expand All @@ -57,7 +61,7 @@ class Performance {
}
}

class InternalPerformance {}
class InternalPerformance extends EventTarget {}
InternalPerformance.prototype.constructor = Performance.prototype.constructor;
ObjectSetPrototypeOf(InternalPerformance.prototype, Performance.prototype);

Expand Down
3 changes: 0 additions & 3 deletions test/wpt/status/hr-time.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"basic.any.js": {
"fail": "self.performance.addEventListener is not a function"
},
"idlharness.any.js": {
"skip": "TODO: update IDL parser"
},
Expand Down