Skip to content

src: fix ContextifyContext property definer interception result - #63549

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
legendecas:vm-intercept-52634
May 27, 2026
Merged

src: fix ContextifyContext property definer interception result#63549
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
legendecas:vm-intercept-52634

Conversation

@legendecas

Copy link
Copy Markdown
Member

This fixes that when defining a property, a definer callback
like a proxy handler would be invoked twice when the property
is writable.

Fixes: #52634

@nodejs-github-botnodejs-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. vm Issues and PRs related to the vm subsystem. labels May 24, 2026
Signed-off-by: Chengzhong Wu <legendecas@gmail.com>
@codecov

codecovBot commented May 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.33%. Comparing base (1ddb754) to head (3fb03c6).
⚠️ Report is 46 commits behind head on main.

Files with missing linesPatch %Lines
src/node_contextify.cc85.71%0 Missing and 1 partial ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #63549 +/- ##
==========================================
+ Coverage 90.31% 90.33% +0.01% 
==========================================
Files 730 730 Lines 234161 234163 +2 Branches 43917 43924 +7 ==========================================
+ Hits 211486 211525 +39 + Misses 14408 14363 -45 - Partials 8267 8275 +8 
Files with missing linesCoverage Δ
src/node_contextify.cc82.04% <85.71%> (-0.56%)⬇️

... and 31 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.

@addaleaxaddaleax 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 May 26, 2026
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 26, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@legendecaslegendecas added the commit-queue Add this label to land a pull request using GitHub Actions. label May 27, 2026
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label May 27, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 8257091 into nodejs:mainMay 27, 2026
77 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 8257091

@legendecas
legendecas deleted the vm-intercept-52634 branch May 27, 2026 15:13
aduh95 pushed a commit that referenced this pull request May 28, 2026
Signed-off-by: Chengzhong Wu <legendecas@gmail.com>
PR-URL: #63549Fixes: #52634
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
aduh95 pushed a commit that referenced this pull request May 30, 2026
Signed-off-by: Chengzhong Wu <legendecas@gmail.com>
PR-URL: #63549Fixes: #52634
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
@Renegade334Renegade334 added the baking-for-lts PRs that need to wait before landing in a LTS release. label Jun 2, 2026
nodejs-github-bot pushed a commit that referenced this pull request Jun 11, 2026
Signed-off-by: Brian Meek <55990082+brianathere@users.noreply.github.com>
PR-URL: #63742Fixes: #63739
Refs: #63549
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
aduh95 pushed a commit that referenced this pull request Jun 18, 2026
Signed-off-by: Brian Meek <55990082+brianathere@users.noreply.github.com>
PR-URL: #63742Fixes: #63739
Refs: #63549
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
legendecas added a commit to legendecas/node that referenced this pull request Jun 22, 2026
This fixes a long-standing issue that
`ContextifyContext::PropertyDefinerCallback` incorrectly copies the
`const PropertyDescriptor& desc`, assigning value to be `undefined` when
no value present on the `PropertyDescriptor`.
This is revealed after nodejs#63549 because
returning `kYes` tells V8 that the definer handled it, and V8 no longer
fixes it up.
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
nodejs-github-bot pushed a commit that referenced this pull request Jun 29, 2026
This fixes a long-standing issue that
`ContextifyContext::PropertyDefinerCallback` incorrectly copies the
`const PropertyDescriptor& desc`, assigning value to be `undefined` when
no value present on the `PropertyDescriptor`.
This is revealed after #63549 because
returning `kYes` tells V8 that the definer handled it, and V8 no longer
fixes it up.
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: #64073Fixes: #64008
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
@legendecaslegendecas added dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. and removed baking-for-lts PRs that need to wait before landing in a LTS release. labels Jul 2, 2026
richardlau pushed a commit that referenced this pull request Jul 3, 2026
This fixes a long-standing issue that
`ContextifyContext::PropertyDefinerCallback` incorrectly copies the
`const PropertyDescriptor& desc`, assigning value to be `undefined` when
no value present on the `PropertyDescriptor`.
This is revealed after #63549 because
returning `kYes` tells V8 that the definer handled it, and V8 no longer
fixes it up.
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: #64073Fixes: #64008
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs 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-v22.xPRs that should not land on the v22.x-staging branch and should not be released in v22.x.dont-land-on-v24.xPRs that should not land on the v24.x-staging branch and should not be released in v24.x.needs-ciPRs that need a full CI run.vmIssues and PRs related to the vm subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ContextifyContext::PropertyDefinerCallback() never intercepts the request

5 participants

@legendecas@nodejs-github-bot@addaleax@aduh95@Renegade334