Skip to content

Instantly share code, notes, and snippets.

@nitely
Forked from domenic/v8-versions.md
Created April 7, 2016 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nitely/9668d9feab88644148a1e62322ff11c5 to your computer and use it in GitHub Desktop.
Save nitely/9668d9feab88644148a1e62322ff11c5 to your computer and use it in GitHub Desktop.
V8 versions for embedders

Embedders of V8 should generally use the head of the branch corresponding to the minor version of V8 that ships in Chrome.

Finding the minor version of V8 corresponding to the latest stable Chrome

To find out what version this is,

  1. Go to https://omahaproxy.appspot.com/
  2. Find the latest stable Chrome version in the table
  3. Enter it into the "Translate a Chrome verison to a V8 version" box below the table.
  4. Ignore the last two parts.

Example: at the time of this writing, the site indicates that for win/stable, the Chrome release version is 39.0.2171.95. Entering that into the box gives back "V8 Version: 3.29.88.17." Cutting that down to only the minor version gives 3.29.

Finding the head of the corresponding branch

V8's version-related branches do not appear in the online repository at https://chromium.googlesource.com/v8/v8.git; instead only tags appear. To find the head of that branch, go to the URL in this form:

https://chromium.googlesource.com/v8/v8.git/+/branch-heads/<minor-version>

Example: for the V8 minor version 3.29 found above, we go to https://chromium.googlesource.com/v8/v8.git/+/branch-heads/3.29, finding a commit titled "Version 3.29.88.19 (cherry-pick)." Thus, the version of V8 that embedders should use at the time of this writing is 3.29.88.19.

Caution: You should not simply find the numerically-greatest tag corresponding to the above minor V8 version, as sometimes those are not supported, e.g. they are tagged before deciding where to cut minor releases. Such versions will not receive backports or similar.

Example: the V8 tags 3.29.91, 3.29.92, 3.29.93, and 3.29.93.1 are abandoned, despite being numerically greater than the branch head of 3.29.88.19.

Checking out the head of the corresponding branch

If you have the source already, you can check out the head somewhat directly. If you have retrieved the source using depot_tools then you should be able to do

$ git branch --remotes | grep branch-heads/

to list the relevant branches. You'll want to check out the one corresponding to the minor V8 version you found above, and use that. The tag that you end up on will be the appropriate V8 version for you as the embedder.

If you did not use depot_tools, you'll need to edit .git/config and add the line below to the [remote "origin"] section:

fetch = +refs/branch-heads/*:refs/remotes/branch-heads/*

Example: for the V8 minor version 3.29 found above, we can do

$ git checkout branch-heads/3.29
HEAD is now at 02f2ff3... Version 3.29.88.19 (cherry-pick)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment