| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
V8 may start caching scripts from the first run soon. Preventively execute scripts in another process to ensure no test failures due to an update in the future. See: nodejs#6258
|
cc @jeisinger |
Sorry, something went wrong.
Sorry, something went wrong.
|
cool, LGTM |
Sorry, something went wrong.
| assert(!script.cachedDataProduced || script.cachedData instanceof Buffer); | ||
|
|
||
| if (script.cachedDataProduced) | ||
| script.cachedData.toString('base64'); |
There was a problem hiding this comment.
The return value isn't used. I think you intended to console.log or process.stdout.write it?
Sorry, something went wrong.
There was a problem hiding this comment.
It is JS, the last statement will be printed when using -p argv.
Sorry, something went wrong.
There was a problem hiding this comment.
Hm, very subtle. I guess it's not wrong but it's not very obviously correct, either. I'd use -e and explicitly print it.
Sorry, something went wrong.
There was a problem hiding this comment.
Ack, I agree.
Sorry, something went wrong.
|
LGTM but with a strong suggestion to change the test. |
Sorry, something went wrong.
Sorry, something went wrong.
| assert.equal(out.status, 0, out.stderr + ''); | ||
|
|
||
| return script.cachedData; | ||
| return new Buffer(out.stdout.toString(), 'base64'); |
There was a problem hiding this comment.
Buffer.from(out.stdout.toString(), 'base64')
Sorry, something went wrong.
There was a problem hiding this comment.
Ack.
Sorry, something went wrong.
|
LGTM with a nit if CI is green |
Sorry, something went wrong.
|
|
||
| let data; | ||
| for (var i = 0; i < ${count}; i++) { | ||
| var script = new vm.Script(process.argv[1], { |
There was a problem hiding this comment.
Just for my understanding, process.argv[1] === undefined here, right?
Sorry, something went wrong.
There was a problem hiding this comment.
It is not, see source on line 32.
Sorry, something went wrong.
There was a problem hiding this comment.
$ node -e 'console.log(process.argv[1])' hello hello
Sorry, something went wrong.
There was a problem hiding this comment.
Bet you didn't know about this 😉
Sorry, something went wrong.
There was a problem hiding this comment.
Oh, I missed the third argument. Never mind.
Sorry, something went wrong.
|
Landed in e1cf634, thank you everyone! |
Sorry, something went wrong.
V8 may start caching scripts from the first run soon. Preventively execute scripts in another process to ensure no test failures due to an update in the future. See: #6258 PR-URL: #6280 Reviewed-By: Jochen Eisinger <jochen@chromium.org> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
|
Marking it don't land in v4 simply because the future update to v8 does not apply |
Sorry, something went wrong.
|
marking dont-land-on-v5.x for the same reason. edit: if we want to backport we can use the commit above. I'll likely delete that branch in the next week if we do not opt for landing it |
Sorry, something went wrong.
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
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>
V8 may start caching scripts from the first run soon. Preventively execute scripts in another process to ensure no test failures due to an update in the future. See: nodejs#6258 PR-URL: nodejs#6280 Reviewed-By: Jochen Eisinger <jochen@chromium.org> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@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: 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 start caching scripts from the first run soon. Preventively execute scripts in another process to ensure no test failures due to an update in the future. See: #6258 PR-URL: #6280 Reviewed-By: Jochen Eisinger <jochen@chromium.org> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@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>
While `let` no longer needs to run in `strict mode` in v8 5.x it throws in v8 4. This modification will make the test-vm-cached-data work in older version of node. Refs: nodejs#6280 PR-URL: nodejs#6317 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
While `let` no longer needs to run in `strict mode` in v8 5.x it throws in v8 4. This modification will make the test-vm-cached-data work in older version of node. Refs: #6280 PR-URL: #6317 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
| Back | FazBrowse Home | New Git URL |
Checklist
Affected core subsystem(s)
test
Description of change
V8 may start caching scripts from the first run soon. Preventively
execute scripts in another process to ensure no test failures due to
an update in the future.
See: #6258