()
| 113 | } |
| 114 | |
| 115 | function readline() { |
| 116 | while (true) { |
| 117 | const lineBreak = line.indexOf('\n'); |
| 118 | if (lineBreak !== -1) { |
| 119 | const res = line.slice(0, lineBreak); |
| 120 | line = line.slice(lineBreak + 1); |
| 121 | return res; |
| 122 | } |
| 123 | const bytes = fs.readSync(fd, buf, 0, buf.length); |
| 124 | line += dec.write(buf.slice(0, bytes)); |
| 125 | if (line.length === 0) { |
| 126 | return ''; |
| 127 | } |
| 128 | if (bytes === 0) { |
| 129 | process.emitWarning(`Profile file ${logFile} is broken`, { |
| 130 | code: 'BROKEN_PROFILE_FILE', |
| 131 | detail: `${JSON.stringify(line)} at the file end is broken`, |
| 132 | }); |
| 133 | return ''; |
| 134 | } |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | function versionCheck(firstLine, expected) { |
| 139 | // v8-version looks like |
no test coverage detected
searching dependent graphs…