diff options
Diffstat (limited to 'runtime/js/40_performance.js')
-rw-r--r-- | runtime/js/40_performance.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/runtime/js/40_performance.js b/runtime/js/40_performance.js index 0a63dc704..b9c873270 100644 --- a/runtime/js/40_performance.js +++ b/runtime/js/40_performance.js @@ -99,6 +99,8 @@ } class PerformanceMark extends PerformanceEntry { + [Symbol.toStringTag] = "PerformanceMark"; + #detail = null; get detail() { @@ -111,8 +113,12 @@ constructor( name, - { detail = null, startTime = now() } = {}, + options = {}, ) { + if (typeof options !== "object") { + throw new TypeError("Invalid options"); + } + const { detail = null, startTime = now() } = options; super(name, "mark", startTime, 0, illegalConstructorKey); if (startTime < 0) { throw new TypeError("startTime cannot be negative"); @@ -140,6 +146,8 @@ } class PerformanceMeasure extends PerformanceEntry { + [Symbol.toStringTag] = "PerformanceMeasure"; + #detail = null; get detail() { |