-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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: v8-flags is sensitive to script caching #6316
Conversation
V8 may cache compiled scripts, and it is not safe to assume that the V8 flags can be changed after an isolate has been created. In this particular case, since we are using the same script multiple times, the test would fail if V8 cached the result of the compilation. Ref: nodejs#6280 Fixes: nodejs#6258
LGTM |
3 similar comments
LGTM |
LGTM |
LGTM |
@ofrobots ... do you wanna get this one landed today so I can get it into the v6 RC.4? |
V8 may cache compiled scripts, and it is not safe to assume that the V8 flags can be changed after an isolate has been created. In this particular case, since we are using the same script multiple times, the test would fail if V8 cached the result of the compilation. Ref: #6280 Fixes: #6258 PR-URL: #6316 Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com> Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
Thanks. Landed as a770a16. |
btw, would this be applicable to v8 v4.6 in the LTS branch also? |
I don't think this fix is necessary on 5.x and 4.x. The behaviour of V8 (especially w.r.t. compiled script caching) is fixed on those branches, and backporting this doesn't add too much value. That said, there is no harm in backporting this particular change. |
V8 may cache compiled scripts, and it is not safe to assume that the V8 flags can be changed after an isolate has been created. In this particular case, since we are using the same script multiple times, the test would fail if V8 cached the result of the compilation. Ref: nodejs#6280 Fixes: nodejs#6258 PR-URL: nodejs#6316 Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com> Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
V8 may cache compiled scripts, and it is not safe to assume that the V8 flags can be changed after an isolate has been created. In this particular case, since we are using the same script multiple times, the test would fail if V8 cached the result of the compilation. Ref: #6280 Fixes: #6258 PR-URL: #6316 Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com> Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
Checklist
Affected core subsystem(s)
test
Description of change
V8 may cache compiled scripts, and it is not safe to assume that the
V8 flags may be changed after an isolate has been created. In this
particular case, since we are using the same script multiple times,
the test would fail if V8 cached the result of the compilation.
This PR, along with #6280 is need to fix the Node.js integration builds that V8 is running against V8 tip-of-tree.
Ref: #6280
Fixes: #6258
R=@bnoordhuis @jeisinger
CI: https://ci.nodejs.org/job/node-test-pull-request/2349/