You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
performance.mark() throws error 'The "name" argument must be specified' #47097
How often does it reproduce? Is there a required condition?
This works fine in Node <19 but throws an error in Node 19.
What is the expected behavior? Why is that the expected behavior?
name is marked as an optional parameter in the docs. I expect no error when calling mark() without a name parameter.
What do you see instead?
❯ node -e "require('perf_hooks').performance.mark()"
node:internal/perf/performance:125
throw new ERR_MISSING_ARGS('name');
^
TypeError [ERR_MISSING_ARGS]: The "name" argument must be specified
at new NodeError (node:internal/errors:399:5)
at Performance.mark (node:internal/perf/performance:125:13)
at [eval]:1:35
at Script.runInThisContext (node:vm:128:12)
at Object.runInThisContext (node:vm:306:38)
at node:internal/process/execution:83:21
at [eval]-wrapper:6:24
at runScript (node:internal/process/execution:82:62)
at evalScript (node:internal/process/execution:104:10)
at node:internal/main/eval_string:50:3 {
code: 'ERR_MISSING_ARGS'
}
Node.js v19.7.0
Activity
targos commentedon Mar 15, 2023
/cc @legendecas
legendecas commentedon Mar 15, 2023
Thanks for reporting the issue!
This is a document inconsistency with the web spec. The spec defines the first parameter
nameas a required argument: https://www.w3.org/TR/user-timing/#ref-for-dom-performance-mark-1.Since #44483 is tagged as semver-major, I think the documents should be fixed respectively.