Skip to content

Commit 6240a57

Browse files
committed
tools: update tick processor for V8 embedder version
Update the processor to accept a V8 with or without an embedder version string.
1 parent 48265fe commit 6240a57

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/internal/v8_prof_polyfill.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,16 @@ function readline() {
8282
}
8383

8484
function versionCheck() {
85-
// v8-version looks like "v8-version,$major,$minor,$build,$patch,$candidate"
85+
// v8-version looks like
86+
// "v8-version,$major,$minor,$build,$patch[,$embedder],$candidate"
8687
// whereas process.versions.v8 is either "$major.$minor.$build" or
8788
// "$major.$minor.$build.$patch".
8889
var firstLine = readline();
8990
line = firstLine + '\n' + line;
9091
firstLine = firstLine.split(',');
9192
const curVer = process.versions.v8.split('.');
92-
if (firstLine.length !== 6 && firstLine[0] !== 'v8-version') {
93+
if (firstLine.length !== 6 && firstLine.length !== 7 ||
94+
firstLine[0] !== 'v8-version') {
9395
console.log('Unable to read v8-version from log file.');
9496
return;
9597
}

0 commit comments

Comments
 (0)