Skip to content

fix(perf_hooks): structured-clone mark/measure detail (#1340)#1440

Merged
proggeramlug merged 1 commit into
mainfrom
fix/perf-detail-clone-1340
May 22, 2026
Merged

fix(perf_hooks): structured-clone mark/measure detail (#1340)#1440
proggeramlug merged 1 commit into
mainfrom
fix/perf-detail-clone-1340

Conversation

@proggeramlug
Copy link
Copy Markdown
Contributor

Summary

performance.mark(name, { detail }) and performance.measure(name, { detail }) should structured-clone detail (node:perf_hooks gap #1340, umbrella #793). Perry stored the same reference, so m.detail === input (and mutating the original mutated the stored entry).

option_detail_bits now routes the value through js_structured_clone, so the stored detail deep-equals the input but is a distinct reference — matching Node.

Test

Flips both test-parity/node-suite/perf_hooks/mark/detail-structured-clone and .../measure/detail-structured-clone to PASS (one root, both removed from known_failures.json); the detail-option tests still pass.

deep equal: true
distinct ref: true

Closes #1340.

mark(name, { detail }) / measure(name, { detail }) now structured-clone
detail via js_structured_clone, so the entry's detail deep-equals the
input but is a distinct reference (mutating the original afterward no
longer mutates the stored entry), matching Node. Flips both
node-suite/perf_hooks/{mark,measure}/detail-structured-clone to PASS;
the detail-option tests still pass.
@proggeramlug proggeramlug merged commit 019cd32 into main May 22, 2026
16 of 17 checks passed
@proggeramlug proggeramlug deleted the fix/perf-detail-clone-1340 branch May 22, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

node:perf_hooks — performance.mark detail should be structured-cloned

1 participant