Skip to content

vm: enable interception on global restricted properties#64202

Open
legendecas wants to merge 2 commits into
nodejs:mainfrom
legendecas:v8-vm-restricted-global
Open

vm: enable interception on global restricted properties#64202
legendecas wants to merge 2 commits into
nodejs:mainfrom
legendecas:v8-vm-restricted-global

Conversation

@legendecas

Copy link
Copy Markdown
Member

deps: V8: backport a05321ebd98e

Original commit message:

[execution] Lookup interceptor for RestrictedGlobalProperty

When the script context looks up if a global property is
restricted, it should also query the global interceptor.

To avoid calling the interceptor for every declaration
unconditionally, an interceptor has to be defined with
`PropertyHandlerFlags::kHasDontDeleteProperty`
to intercept restricted global property queries.

Refs: https://github.com/nodejs/node/issues/63715
Refs: https://github.com/nodejs/node/issues/52634

Change-Id: I623ff285c4e8773d8ee7f681cbad68ba24bd3f40
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7898818
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#108280}

Refs: v8/v8@a05321e

vm: enable interception on global restricted properties

Fixes: #63715

Original commit message:

    [execution] Lookup interceptor for RestrictedGlobalProperty

    When the script context looks up if a global property is
    restricted, it should also query the global interceptor.

    To avoid calling the interceptor for every declaration
    unconditionally, an interceptor has to be defined with
    `PropertyHandlerFlags::kHasDontDeleteProperty`
    to intercept restricted global property queries.

    Refs: nodejs#63715
    Refs: nodejs#52634

    Change-Id: I623ff285c4e8773d8ee7f681cbad68ba24bd3f40
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7898818
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Reviewed-by: Igor Sheludko <ishell@chromium.org>
    Commit-Queue: Igor Sheludko <ishell@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#108280}

Refs: v8/v8@a05321e
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/security-wg
  • @nodejs/v8-update

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Jun 29, 2026
@legendecas legendecas added the v8 engine Issues and PRs related to the V8 dependency. label Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vm: let declaration no longer throws SyntaxError for non-configurable global property in vm context (regression in v26)

2 participants