File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -66,17 +66,15 @@ function getMark(name) {
6666 return ts ;
6767}
6868
69- const kEmptyArg = Symbol ( 'kEmptyArg' ) ;
70-
7169class PerformanceMark extends PerformanceEntry {
72- constructor ( name = kEmptyArg , options = undefined ) {
73- if ( name === kEmptyArg ) {
70+ constructor ( name , options = undefined ) {
71+ if ( arguments . length === 0 ) {
7472 throw new ERR_MISSING_ARGS ( 'name' ) ;
7573 }
7674 name = `${ name } ` ;
7775 if ( nodeTimingReadOnlyAttributes . has ( name ) )
7876 throw new ERR_INVALID_ARG_VALUE ( 'name' , name ) ;
79- if ( options !== undefined ) {
77+ if ( options != null ) {
8078 validateObject ( options , 'options' ) ;
8179 }
8280 const startTime = options ?. startTime ?? now ( ) ;
@@ -86,8 +84,6 @@ class PerformanceMark extends PerformanceEntry {
8684 markTimings . set ( name , startTime ) ;
8785
8886 let detail = options ?. detail ;
89- // The usage of != is intentional, we want to skip structuredClone
90- // for both undefined and null
9187 detail = detail != null ?
9288 structuredClone ( detail ) :
9389 null ;
You can’t perform that action at this time.
0 commit comments