GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — lib: make structuredClone spec compliant by VoltrexKeyva · Pull Request #40251 · nodejs/node

Conversation

@VoltrexKeyva

@VoltrexKeyva VoltrexKeyva commented Sep 29, 2021

Copy link
Copy Markdown
Contributor

Fixes: #40246

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss and petamoriken reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Sep 29, 2021
@targos

targos commented Sep 29, 2021

Copy link
Copy Markdown
Member

It would be nice to have a WPT for this.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos

targos commented Sep 29, 2021

Copy link
Copy Markdown
Member

BTW, I'm not sure we should throw an error, but instead just grab transfer from the passed object and create a new options object with it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@VoltrexKeyva

VoltrexKeyva commented Sep 29, 2021

Copy link
Copy Markdown
Contributor Author

BTW, I'm not sure we should throw an error, but instead just grab transfer from the passed object and create a new options object with it.

We mostly just throw an error if the passed value is not spec complaint in most cases, throwing an error here would be nice for keeping consistency unless there's a special case where we have to avoid throwing an error.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos

targos commented Sep 29, 2021

Copy link
Copy Markdown
Member

What's important here is not consistency, but spec compliance. The spec just asks to pass options["transfer"]. Maybe I'm wrong, but I understand that it should not be an error to do this:

const options = [];
options.transfer = [toTransfer];
structuredClone({}, options);
VoltrexKeyva reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@VoltrexKeyva
VoltrexKeyva force-pushed the fix-structuredclone branch from 8537f2e to ab4fd2b Compare September 29, 2021 06:58
aduh95
aduh95 reviewed Sep 29, 2021
View reviewed changes
Comment thread lib/internal/structured_clone.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@VoltrexKeyva
lib: make structuredClone spec compliant
0fd3037
Fixes: nodejs#40246
@VoltrexKeyva
VoltrexKeyva force-pushed the fix-structuredclone branch from ab4fd2b to 0fd3037 Compare September 29, 2021 08:49
@targos

targos commented Sep 29, 2021

Copy link
Copy Markdown
Member

Do we have a WHATWG spec specialist that we could ping to take a look?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aduh95

aduh95 commented Sep 29, 2021

Copy link
Copy Markdown
Contributor

Maybe @surma would be available to review this, since they are the one who proposed this API to WHATWG.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jasnell
jasnell approved these changes Sep 30, 2021
View reviewed changes
targos
targos approved these changes Oct 1, 2021
View reviewed changes
benjamingr
benjamingr approved these changes Oct 3, 2021
View reviewed changes
aduh95
aduh95 approved these changes Oct 3, 2021
View reviewed changes
@aduh95 aduh95 added author ready PRs with CI started, the required approvals, and no outstanding review comments. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Oct 3, 2021
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Oct 3, 2021
@nodejs-github-bot

nodejs-github-bot commented Oct 3, 2021

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/40142/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Oct 3, 2021

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/40144/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aduh95 aduh95 added the commit-queue PRs queued for automated landing through the Commit Queue. label Oct 3, 2021
@github-actions github-actions Bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Oct 3, 2021
@github-actions

github-actions Bot commented Oct 3, 2021

Copy link
Copy Markdown
Contributor

Landed in 6199441...3d11baf

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot closed this Oct 3, 2021
nodejs-github-bot pushed a commit that referenced this pull request Oct 3, 2021
@VoltrexKeyva @nodejs-github-bot
lib: make structuredClone spec compliant
3d11baf
Fixes: #40246

PR-URL: #40251
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
@VoltrexKeyva
VoltrexKeyva deleted the fix-structuredclone branch October 3, 2021 15:25
@github-actions github-actions Bot mentioned this pull request Oct 4, 2021
CI Reliability 2021-10-04 nodejs/reliability#77
Open
22 tasks
danielleadams pushed a commit that referenced this pull request Oct 4, 2021
@VoltrexKeyva @danielleadams
lib: make structuredClone spec compliant
3fbc172
Fixes: #40246

PR-URL: #40251
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
danielleadams pushed a commit that referenced this pull request Oct 4, 2021
@VoltrexKeyva @danielleadams
lib: make structuredClone spec compliant
57491ca
Fixes: #40246

PR-URL: #40251
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
@danielleadams danielleadams mentioned this pull request Oct 4, 2021
v16.11.0 release proposal #40319
Merged
@github-actions github-actions Bot mentioned this pull request Oct 5, 2021
CI Reliability 2021-10-05 nodejs/reliability#78
Open
21 tasks
danielleadams pushed a commit that referenced this pull request Oct 5, 2021
@VoltrexKeyva @danielleadams
lib: make structuredClone spec compliant
1ccecf4
Fixes: #40246

PR-URL: #40251
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
@danielleadams danielleadams added the dont-land-on-v16.x label Oct 5, 2021
This was referenced Oct 6, 2021
CI Reliability 2021-10-06 nodejs/reliability#79
Open
CI Reliability 2021-10-07 nodejs/reliability#80
Open
CI Reliability 2021-10-08 nodejs/reliability#81
Open
CI Reliability 2021-10-09 nodejs/reliability#82
Open
@BethGriggs BethGriggs mentioned this pull request Oct 14, 2021
2021-10-19, Version 17.0.0 (Current) #40119
Merged
2 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@benjamingr benjamingr benjamingr approved these changes
@aduh95 aduh95 aduh95 approved these changes
+1 more reviewer
@targos targos targos approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. needs-ci PRs that need a full CI run.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Invalid globalThis.structuredClone interface

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@VoltrexKeyva @targos @aduh95 @nodejs-github-bot @jasnell @benjamingr @danielleadams
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.