Skip to content
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

test: force context allocation in test module #18312

Closed
wants to merge 2 commits into from

Conversation

hashseed
Copy link
Member

This is to anticipate test/parallel/test-inspector-esm.js failing due to V8's behavior changing in c3bd741efd.

Top-level variables in a module are then no longer context-allocated by default. That however is expected in the test. This change forces context allocation by closing over top-level variables.

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

test

V8's behavior changed in c3bd741efd. Top-level variables
in a module are no longer context-allocated by default.
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Jan 23, 2018
@hashseed
Copy link
Member Author

@hashseed
Copy link
Member Author

Adding reviewers of the PR that added the test in the first place.

process.exit(55);

(function force_context_allocation() { return t + k; })
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a comment explaining why this is necessary. I worry that with the rate of code changes, the git commit message may get lost.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@hashseed
Copy link
Member Author

Added a comment as @cjihrig suggested.

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

@hashseed
Copy link
Member Author

Landed in fa33f02.

@hashseed hashseed closed this Jan 26, 2018
hashseed added a commit that referenced this pull request Jan 26, 2018
V8's behavior changed in c3bd741efd. Top-level variables
in a module are no longer context-allocated by default.

PR-URL: #18312
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Feb 20, 2018
V8's behavior changed in c3bd741efd. Top-level variables
in a module are no longer context-allocated by default.

PR-URL: #18312
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Feb 21, 2018
V8's behavior changed in c3bd741efd. Top-level variables
in a module are no longer context-allocated by default.

PR-URL: #18312
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Feb 21, 2018
V8's behavior changed in c3bd741efd. Top-level variables
in a module are no longer context-allocated by default.

PR-URL: #18312
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Feb 21, 2018
@MylesBorins
Copy link
Contributor

setting don't land for 6 / 8 since the commit this is guarding against is not in the versions of V8 in either release stream

@hashseed hashseed deleted the fixloopmjs branch April 16, 2018 09:08
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
V8's behavior changed in c3bd741efd. Top-level variables
in a module are no longer context-allocated by default.

PR-URL: nodejs#18312
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants