Repository navigation
vm: preserve attributes when redefining built-in globals - #67365
Draft
Anshikakalpana wants to merge 1 commit into
Draft
Anshikakalpana wants to merge 1 commit into
Anshikakalpana wants to merge 1 commit into
Conversation
Signed-off-by: Anshika Jain <anshikajain196872@gmail.com>
Anshikakalpana
marked this pull request as draft
November 9, 2026 20:44
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #67365 +/- ##
==========================================
- Coverage 90.72% 90.71% -0.01%
==========================================
Files 798 798
Lines 280015 280020 +5
Branches 53858 53856 -2
==========================================
- Hits 254046 254031 -15
- Misses 16264 16282 +18
- Partials 9705 9707 +2
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PropertyDefinerCallbackalways defines on the sandbox. Built-in globals such asglobalThisexist on the real global but not on the sandbox, soObject.defineProperty(globalThis, 'globalThis', {})created a fresh property with default attributes (value: undefined, all flags false) instead of preserving the existing ones.If the property is declared on the global but absent from the sandbox, return
Intercepted::kNoso V8 performs the ordinary define on the real global, which preserves unspecified attributes.Added a regression test to
test-vm-property-definer-partial-update.js. It fails without the change and passes with it.test-vm-*,test-repl*,test-global*andtest-util-inspect*pass locally.Fixes: #67351