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

src: fix unhandled error in structuredClone #54764

Merged

Conversation

daeyeon
Copy link
Member

@daeyeon daeyeon commented Sep 4, 2024

Fixes: #54602

This patch adds error handling in structuredClone for objects set as cloneable but untransferable via markTransferMode(this, true, false). As a result, it ensures that a DataCloneError is thrown when cloning a Blob with the transfer option.

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Sep 4, 2024
@RedYetiDev RedYetiDev added the web-standards Issues and PRs related to Web APIs label Sep 4, 2024
Copy link

codecov bot commented Sep 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.61%. Comparing base (298dea0) to head (2431414).
Report is 250 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #54764   +/-   ##
=======================================
  Coverage   87.61%   87.61%           
=======================================
  Files         650      650           
  Lines      182829   182831    +2     
  Branches    35382    35378    -4     
=======================================
+ Hits       160179   160195   +16     
+ Misses      15931    15916   -15     
- Partials     6719     6720    +1     
Files with missing lines Coverage Δ
src/node_messaging.cc 84.28% <100.00%> (+0.12%) ⬆️

... and 36 files with indirect coverage changes

@daeyeon daeyeon added request-ci Add this label to start a Jenkins CI on a PR. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Sep 6, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 6, 2024
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Sep 6, 2024

@jasnell jasnell added commit-queue Add this label to land a pull request using GitHub Actions. and removed needs-ci PRs that need a full CI run. labels Sep 7, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 7, 2024
@nodejs-github-bot nodejs-github-bot merged commit eab9729 into nodejs:main Sep 7, 2024
70 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in eab9729

aduh95 pushed a commit that referenced this pull request Sep 12, 2024
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
PR-URL: #54764
Fixes: #54602
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@RafaelGSS RafaelGSS mentioned this pull request Sep 16, 2024
@targos targos added the dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. label Sep 22, 2024
louwers pushed a commit to louwers/node that referenced this pull request Nov 2, 2024
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
PR-URL: nodejs#54764
Fixes: nodejs#54602
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. web-standards Issues and PRs related to Web APIs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Node.js allows the structedClone of objects that do "not have a transferable type."
6 participants