test: v8-flags is sensitive to script caching
Checklist
-
tests and code linting passes -
the commit message follows commit guidelines
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: https://github.com/nodejs/node/issues/6280 Fixes: https://github.com/nodejs/node/issues/6258
R=@bnoordhuis @jeisinger CI: https://ci.nodejs.org/job/node-test-pull-request/2349/