summaryrefslogtreecommitdiff
path: root/extensions/timers/02_performance.js
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/timers/02_performance.js')
-rw-r--r--extensions/timers/02_performance.js42
1 files changed, 38 insertions, 4 deletions
diff --git a/extensions/timers/02_performance.js b/extensions/timers/02_performance.js
index b4cf5760b..f752ba933 100644
--- a/extensions/timers/02_performance.js
+++ b/extensions/timers/02_performance.js
@@ -16,6 +16,7 @@
} = window.__bootstrap.primordials;
const { webidl, structuredClone } = window.__bootstrap;
+ const consoleInternal = window.__bootstrap.console;
const { opNow } = window.__bootstrap.timers;
const { DOMException } = window.__bootstrap.domException;
@@ -175,7 +176,16 @@
}
[customInspect](inspect) {
- return `${this.constructor.name} ${inspect(this.toJSON())}`;
+ return inspect(consoleInternal.createFilteredInspectProxy({
+ object: this,
+ evaluate: this instanceof PerformanceEntry,
+ keys: [
+ "name",
+ "entryType",
+ "startTime",
+ "duration",
+ ],
+ }));
}
}
webidl.configurePrototype(PerformanceEntry);
@@ -235,7 +245,17 @@
}
[customInspect](inspect) {
- return `${this.constructor.name} ${inspect(this.toJSON())}`;
+ return inspect(consoleInternal.createFilteredInspectProxy({
+ object: this,
+ evaluate: this instanceof PerformanceMark,
+ keys: [
+ "name",
+ "entryType",
+ "startTime",
+ "duration",
+ "detail",
+ ],
+ }));
}
}
webidl.configurePrototype(PerformanceMark);
@@ -283,7 +303,17 @@
}
[customInspect](inspect) {
- return `${this.constructor.name} ${inspect(this.toJSON())}`;
+ return inspect(consoleInternal.createFilteredInspectProxy({
+ object: this,
+ evaluate: this instanceof PerformanceMeasure,
+ keys: [
+ "name",
+ "entryType",
+ "startTime",
+ "duration",
+ "detail",
+ ],
+ }));
}
}
webidl.configurePrototype(PerformanceMeasure);
@@ -516,7 +546,11 @@
}
[customInspect](inspect) {
- return `${this.constructor.name} ${inspect(this.toJSON())}`;
+ return inspect(consoleInternal.createFilteredInspectProxy({
+ object: this,
+ evaluate: this instanceof Performance,
+ keys: [],
+ }));
}
get [SymbolToStringTag]() {