File tree 1 file changed +3
-7
lines changed
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -66,17 +66,15 @@ function getMark(name) {
66
66
return ts ;
67
67
}
68
68
69
- const kEmptyArg = Symbol ( 'kEmptyArg' ) ;
70
-
71
69
class PerformanceMark extends PerformanceEntry {
72
- constructor ( name = kEmptyArg , options = undefined ) {
73
- if ( name === kEmptyArg ) {
70
+ constructor ( name , options = undefined ) {
71
+ if ( arguments . length === 0 ) {
74
72
throw new ERR_MISSING_ARGS ( 'name' ) ;
75
73
}
76
74
name = `${ name } ` ;
77
75
if ( nodeTimingReadOnlyAttributes . has ( name ) )
78
76
throw new ERR_INVALID_ARG_VALUE ( 'name' , name ) ;
79
- if ( options !== undefined ) {
77
+ if ( options != null ) {
80
78
validateObject ( options , 'options' ) ;
81
79
}
82
80
const startTime = options ?. startTime ?? now ( ) ;
@@ -86,8 +84,6 @@ class PerformanceMark extends PerformanceEntry {
86
84
markTimings . set ( name , startTime ) ;
87
85
88
86
let detail = options ?. detail ;
89
- // The usage of != is intentional, we want to skip structuredClone
90
- // for both undefined and null
91
87
detail = detail != null ?
92
88
structuredClone ( detail ) :
93
89
null ;
You can’t perform that action at this time.
0 commit comments