Skip to content

Commit

Permalink
tools: update tick processor for V8 embedder version
Browse files Browse the repository at this point in the history
Update the processor to accept a V8 with or without an embedder version
string.
  • Loading branch information
targos committed Dec 7, 2016
1 parent 48265fe commit 6240a57
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/internal/v8_prof_polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,16 @@ function readline() {
}

function versionCheck() {
// v8-version looks like "v8-version,$major,$minor,$build,$patch,$candidate"
// v8-version looks like
// "v8-version,$major,$minor,$build,$patch[,$embedder],$candidate"
// whereas process.versions.v8 is either "$major.$minor.$build" or
// "$major.$minor.$build.$patch".
var firstLine = readline();
line = firstLine + '\n' + line;
firstLine = firstLine.split(',');
const curVer = process.versions.v8.split('.');
if (firstLine.length !== 6 && firstLine[0] !== 'v8-version') {
if (firstLine.length !== 6 && firstLine.length !== 7 ||
firstLine[0] !== 'v8-version') {
console.log('Unable to read v8-version from log file.');
return;
}
Expand Down

0 comments on commit 6240a57

Please sign in to comment.