Skip to content

Commit

Permalink
Revert "assert: fix line number calculation after V8 upgrade"
Browse files Browse the repository at this point in the history
This reverts commit 5981fb7.

PR-URL: #32116
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
targos authored and mmarchini committed Mar 18, 2020
1 parent f90eba1 commit 9b6e797
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.6',
'v8_embedder_string': '-node.7',

##### V8 defaults for Node.js #####

Expand Down
5 changes: 1 addition & 4 deletions lib/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ function getErrMessage(message, fn) {
const call = err.stack[0];

const filename = call.getFileName();
let line = call.getLineNumber() - 1;
const line = call.getLineNumber() - 1;
let column = call.getColumnNumber() - 1;
let identifier;
let code;
Expand All @@ -298,9 +298,6 @@ function getErrMessage(message, fn) {
return message;
}
code = String(fn);
// For functions created with the Function constructor, V8 does not count
// the lines containing the function header.
line += 2;
identifier = `${code}${line}${column}`;
}

Expand Down

0 comments on commit 9b6e797

Please sign in to comment.