MCPcopy Index your code
hub / github.com/nodejs/node / versionCheck

Function versionCheck

lib/internal/v8_prof_polyfill.js:138–153  ·  view source on GitHub ↗
(firstLine, expected)

Source from the content-addressed store, hash-verified

136}
137
138function versionCheck(firstLine, expected) {
139 // v8-version looks like
140 // "v8-version,$major,$minor,$build,$patch[,$embedder],$candidate"
141 // whereas process.versions.v8 is either "$major.$minor.$build-$embedder" or
142 // "$major.$minor.$build.$patch-$embedder".
143 firstLine = firstLine.split(',');
144 const curVer = expected.split(/[.-]/);
145 if ((firstLine.length !== 6 && firstLine.length !== 7) ||
146 firstLine[0] !== 'v8-version') {
147 return 'Unable to read v8-version from log file.';
148 }
149 // Compare major, minor and build; ignore the patch and candidate fields.
150 for (let i = 0; i < 3; i++)
151 if (curVer[i] !== firstLine[i + 1])
152 return 'Testing v8 version different from logging version';
153}
154
155function macCppfiltNm(out) {
156 // Re-grouped copy-paste from `tickprocessor.js`

Callers 2

openFileFunction · 0.85

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…