-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Conversation
V8's behavior changed in c3bd741efd. Top-level variables in a module are no longer context-allocated by default.
Adding reviewers of the PR that added the test in the first place. |
test/fixtures/es-modules/loop.mjs
Outdated
process.exit(55); | ||
|
||
(function force_context_allocation() { return t + k; }) |
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.
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.
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.
Done.
Added a comment as @cjihrig suggested. New CI job: https://ci.nodejs.org/job/node-test-pull-request/12726/ |
Landed in fa33f02. |
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>
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>
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>
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>
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 |
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>
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), orvcbuild test
(Windows) passesAffected core subsystem(s)
test