Skip to content

src: avoid calling SetPrototypeV2() #57949

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

Merged
merged 1 commit into from
Apr 22, 2025

Conversation

anonrig
Copy link
Member

@anonrig anonrig commented Apr 20, 2025

Setting the prototype can be achieved by the v8::Object::New() constructor. We don't need to call SetPrototypeV2().

@anonrig anonrig requested a review from jasnell April 20, 2025 15:17
@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 Apr 20, 2025
@anonrig anonrig force-pushed the yagiz/avoid-set-prototypev2 branch from 9578bd1 to 24013be Compare April 20, 2025 15:18
@anonrig anonrig force-pushed the yagiz/avoid-set-prototypev2 branch from 24013be to ff7cf87 Compare April 20, 2025 15:24
@anonrig anonrig requested review from mcollina and aduh95 April 20, 2025 15:26
Copy link

codecov bot commented Apr 20, 2025

Codecov Report

Attention: Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.

Project coverage is 90.27%. Comparing base (afd318d) to head (ff7cf87).
Report is 156 commits behind head on main.

Files with missing lines Patch % Lines
src/api/environment.cc 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #57949      +/-   ##
==========================================
+ Coverage   90.26%   90.27%   +0.01%     
==========================================
  Files         630      630              
  Lines      186083   186105      +22     
  Branches    36454    36461       +7     
==========================================
+ Hits       167962   168003      +41     
+ Misses      10985    10970      -15     
+ Partials     7136     7132       -4     
Files with missing lines Coverage Δ
src/node_constants.cc 99.71% <100.00%> (+2.53%) ⬆️
src/api/environment.cc 75.13% <50.00%> (+0.13%) ⬆️

... and 26 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@anonrig anonrig added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Apr 20, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 20, 2025
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@anonrig anonrig added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 20, 2025
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 22, 2025
@nodejs-github-bot nodejs-github-bot merged commit 1c0a405 into nodejs:main Apr 22, 2025
63 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 1c0a405

RafaelGSS pushed a commit that referenced this pull request May 1, 2025
PR-URL: #57949
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
RafaelGSS pushed a commit that referenced this pull request May 2, 2025
PR-URL: #57949
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@aduh95 aduh95 added the backport-requested-v22.x PRs awaiting manual backport to the v22.x-staging branch. label May 6, 2025
@aduh95
Copy link
Contributor

aduh95 commented May 6, 2025

This doesn't land cleanly on v22.x-staging

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. backport-requested-v22.x PRs awaiting manual backport to the v22.x-staging branch. c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants