Skip to content

Conversation

@ofrobots
Copy link
Contributor

@ofrobots ofrobots commented Apr 20, 2016

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: #6280
Fixes: #6258

R=@bnoordhuis @jeisinger
CI: https://ci.nodejs.org/job/node-test-pull-request/2349/

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Apr 20, 2016
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
@bnoordhuis
Copy link
Member

LGTM

3 similar comments
@targos
Copy link
Member

targos commented Apr 21, 2016

LGTM

@jeisinger
Copy link
Contributor

LGTM

@cjihrig
Copy link
Contributor

cjihrig commented Apr 21, 2016

LGTM

@jasnell
Copy link
Member

jasnell commented Apr 21, 2016

@ofrobots ... do you wanna get this one landed today so I can get it into the v6 RC.4?

ofrobots added a commit that referenced this pull request Apr 21, 2016
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>
@ofrobots
Copy link
Contributor Author

Thanks. Landed as a770a16.

@ofrobots ofrobots closed this Apr 21, 2016
@jasnell
Copy link
Member

jasnell commented Apr 21, 2016

btw, would this be applicable to v8 v4.6 in the LTS branch also?

@ofrobots
Copy link
Contributor Author

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.

joelostrowski pushed a commit to joelostrowski/node that referenced this pull request Apr 25, 2016
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>
jasnell pushed a commit that referenced this pull request Apr 26, 2016
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>
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.

Some tests assume that a single compilation is not cached

7 participants