Commit b799a74
committed
src: fix line numbers on core errors
In dfee4e3, the module wrapper
and line offset used when wrapping module code was changed to
better report errors on the first line of modules. However, that
commit did not update the runInThisContext() call used to
execute the core modules, so their error line numbers have been
off by one. This commit provides the correct lineOffset for core
modules.
Refs: #2867
PR-URL: #4254
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>1 parent 36ac3d6 commit b799a74Copy full SHA for b799a74
File tree
Expand file treeCollapse file tree
3 files changed
+30
-1
lines changedOpen diff view settings
Filter options
- src
- test/message
Expand file treeCollapse file tree
3 files changed
+30
-1
lines changedOpen diff view settings
Collapse file
+4-1Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
966 | 966 | |
967 | 967 | |
968 | 968 | |
969 | | - |
| 969 | + |
| 970 | + |
| 971 | + |
| 972 | + |
970 | 973 | |
971 | 974 | |
972 | 975 | |
|
Collapse file
test/message/core_line_numbers.js
Copy file name to clipboard+11Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
Collapse file
test/message/core_line_numbers.out
Copy file name to clipboard+15Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
0 commit comments