Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structured cloning implementation from performance.mark is incomplete #40840

Closed
zloirock opened this issue Nov 17, 2021 · 1 comment · Fixed by #40904
Closed

Structured cloning implementation from performance.mark is incomplete #40840

zloirock opened this issue Nov 17, 2021 · 1 comment · Fixed by #40904
Labels
perf_hooks Issues and PRs related to the implementation of the Performance Timing API.

Comments

@zloirock
Copy link

zloirock commented Nov 17, 2021

Version

17.1.0

Platform

MacOS 12

Subsystem

No response

What steps will reproduce the bug?

performance.mark(1, { detail: /q/i }).detail; // => Uncaught Error: Unable to deserialize cloned data

performance.mark(1, { detail: Object('a') }).detail; // => Uncaught Error: Unable to deserialize cloned data

However, structuredClone works fine here:

structuredClone(/q/i); // => /q/i

structuredClone(Object('a')); // => Object('a')

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior?

https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal

https://html.spec.whatwg.org/multipage/structured-data.html#structureddeserialize

What do you see instead?

No response

Additional information

No response

targos added a commit to targos/node that referenced this issue Nov 21, 2021
Serialize PerformanceMark's `detail` correctly.

Fixes: nodejs#40840
@targos
Copy link
Member

targos commented Nov 21, 2021

Fix in #40904

@Mesteery Mesteery added the perf_hooks Issues and PRs related to the implementation of the Performance Timing API. label Nov 21, 2021
nodejs-github-bot pushed a commit that referenced this issue Nov 29, 2021
Serialize PerformanceMark's `detail` correctly.

Fixes: #40840

PR-URL: #40904
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
danielleadams pushed a commit that referenced this issue Dec 13, 2021
Serialize PerformanceMark's `detail` correctly.

Fixes: #40840

PR-URL: #40904
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
danielleadams pushed a commit that referenced this issue Dec 14, 2021
Serialize PerformanceMark's `detail` correctly.

Fixes: #40840

PR-URL: #40904
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf_hooks Issues and PRs related to the implementation of the Performance Timing API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants