GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: remove unused env->vm_parsing_context_symbol by maclover7 · Pull Request #22034 · nodejs/node

Conversation

@maclover7

@maclover7 maclover7 commented Jul 31, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Stopped being used via 77b52fd, was
originally added in d932e80.

For the one remaining usecase inside of lib/vm.js, define a Symbol at
the top of the file.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot

nodejs-github-bot commented Jul 31, 2018

Copy link
Copy Markdown
Collaborator

@maclover7 build started: https://ci.nodejs.org/blue/organizations/jenkins/node-test-pull-request-lite-pipeline/detail/node-test-pull-request-lite-pipeline/384/pipeline

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. vm Issues and PRs related to the vm subsystem. labels Jul 31, 2018
devsnek
devsnek approved these changes Jul 31, 2018
View reviewed changes
TimothyGu
TimothyGu suggested changes Jul 31, 2018
View reviewed changes

@TimothyGu TimothyGu left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This is still very much used in https://github.com/nodejs/node/blob/master/lib/vm.js. The way the symbol was used in that file made the tests magically pass (as the string key 'undefined' is used in place).

In that particular file the symbol could just be changed to a regular local one declared with Symbol().

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@addaleax

addaleax commented Jul 31, 2018

Copy link
Copy Markdown
Member

@TimothyGu But is the property read anywhere? At a glance, it looks like this would be safe to remove from vm.js as well…?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@maclover7

maclover7 commented Jul 31, 2018

Copy link
Copy Markdown
Contributor Author

Ah, sorry, missed the lib/vm.js usecase (got when looking over 77b52fd and read that filename as lib/vm.js by accident)

I agree with @addaleax though that the use in lib/vm.js could be removed -- doing ggrep -r kParsingContext test/ comes up empty, and whatever ggrep -r "new vm.Script(" test/ and ggrep -r "new Script(" . returns doesn't seem to interact with the symbol at all.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos

targos commented Jul 31, 2018

Copy link
Copy Markdown
Member

+1 for removal and using a Symbol() declared in vm.js

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@maclover7

maclover7 commented Aug 2, 2018

Copy link
Copy Markdown
Contributor Author

@TimothyGu I updated to use a symbol declared inside vm.js -- does this seem okay to you?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

TimothyGu
TimothyGu approved these changes Aug 2, 2018
View reviewed changes
@TimothyGu

TimothyGu commented Aug 2, 2018

Copy link
Copy Markdown
Member

Looks good, thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

targos
targos approved these changes Aug 3, 2018
View reviewed changes
@maclover7
src: remove unused env->vm_parsing_context_symbol
677cd3b
Stopped being used via 77b52fd, was
originally added in d932e80.

For the one remaining usecase inside of `lib/vm.js`, define a Symbol at
the top of the file.
@maclover7

maclover7 commented Aug 3, 2018

Copy link
Copy Markdown
Contributor Author

CI: https://ci.nodejs.org/job/node-test-pull-request/16166/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cjihrig
cjihrig approved these changes Aug 3, 2018
View reviewed changes
@maclover7 maclover7 added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Aug 4, 2018
@maclover7

maclover7 commented Aug 4, 2018

Copy link
Copy Markdown
Contributor Author

Landed in bd2ee60, thank you for the reviews!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@maclover7 maclover7 closed this Aug 4, 2018
@maclover7
maclover7 deleted the jm-rm-parsingcontext branch August 4, 2018 21:08
maclover7 added a commit that referenced this pull request Aug 4, 2018
@maclover7
src: remove unused env->vm_parsing_context_symbol
bd2ee60
Stopped being used via 77b52fd, was
originally added in d932e80.

For the one remaining usecase inside of `lib/vm.js`, define a Symbol at
the top of the file.

PR-URL: #22034
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@addaleax

addaleax commented Aug 5, 2018

Copy link
Copy Markdown
Member

@maclover7 @TimothyGu Uh … this seems to have gotten lost in the discussion, but still, does anything speak against removing this key completely?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TimothyGu

TimothyGu commented Aug 5, 2018

Copy link
Copy Markdown
Member

@addaleax The symbol is used to transmit the parsing context information from vm.runInContext and vm.runInNewContext to the Script constructor, without creating a new public option as the Script constructor is public. I'm fine with exposing it as a public option but it met resistance in #14888 (#14888 (comment)).

addaleax and maclover7 reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos targos added backport-requested-v10.x and removed author ready PRs with CI started, the required approvals, and no outstanding review comments. labels Aug 6, 2018
@targos

targos commented Aug 6, 2018

Copy link
Copy Markdown
Member

Depends on #21668 to land on v10.x-staging. More specifically this commit: 104953c

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos targos removed the backport-requested-v10.x label Aug 11, 2018
targos pushed a commit that referenced this pull request Aug 11, 2018
@maclover7 @targos
src: remove unused env->vm_parsing_context_symbol
9d80199
Stopped being used via 77b52fd, was
originally added in d932e80.

For the one remaining usecase inside of `lib/vm.js`, define a Symbol at
the top of the file.

PR-URL: #22034
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@rvagg rvagg mentioned this pull request Aug 13, 2018
Release proposal: v10.9.0 #22295
Merged
This was referenced Aug 16, 2018
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#230
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#215
Closed
This was referenced Aug 16, 2018
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#231
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#216
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#232
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#217
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#233
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#218
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#234
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#219
Closed
@aliceUnhinged613 aliceUnhinged613 mentioned this pull request May 16, 2022
[Snyk] Security upgrade gatsby from 2.18.18 to 2.19.36 aliceUnhinged613/node#58
Open
This was referenced May 16, 2022
[Snyk] Security upgrade gatsby from 2.18.18 to 2.19.36 137717unity/node#57
Open
[Snyk] Security upgrade gatsby from 2.18.18 to 2.19.36 Rednickle/node-1#49
Open
@kissofire kissofire mentioned this pull request May 16, 2022
[Snyk] Security upgrade gatsby from 2.13.73 to 2.19.36 kissofire/node#67
Open
@wedataintelligence wedataintelligence mentioned this pull request May 16, 2022
[Snyk] Security upgrade gatsby from 2.18.18 to 2.19.36 wedataintelligence/node#33
Open
@ron-a20 ron-a20 mentioned this pull request May 16, 2022
[Snyk] Security upgrade gatsby from 2.18.18 to 2.19.36 ron-a20/node#66
Open
@molllyn1 molllyn1 mentioned this pull request May 17, 2022
[Snyk] Security upgrade gatsby from 2.18.18 to 2.19.36 molllyn1/node#48
Open
firass111 pushed a commit to firass111/Project_node1 that referenced this pull request Apr 16, 2025
@maclover7 @rvagg
src: remove unused env->vm_parsing_context_symbol
c09872b
Stopped being used via 77b52fd, was
originally added in d932e80.

For the one remaining usecase inside of `lib/vm.js`, define a Symbol at
the top of the file.

PR-URL: nodejs/node#22034
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cjihrig cjihrig cjihrig approved these changes
+3 more reviewers
@TimothyGu TimothyGu TimothyGu approved these changes
@targos targos targos approved these changes
@devsnek devsnek devsnek approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. vm Issues and PRs related to the vm subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@maclover7 @nodejs-github-bot @addaleax @targos @TimothyGu @cjihrig @devsnek
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.